Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2fc9e8e6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "USB: android: Fix rmnet_gport_setup error path handling on sigkill"

parents 4ff1e85e 17fa4adb
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -940,7 +940,6 @@ static int rmnet_function_bind_config(struct android_usb_function *f,
	static int rmnet_initialized, ports;

	if (!rmnet_initialized) {
		rmnet_initialized = 1;
		strlcpy(buf, rmnet_transports, sizeof(buf));
		b = strim(buf);

@@ -969,8 +968,11 @@ static int rmnet_function_bind_config(struct android_usb_function *f,
		err = rmnet_gport_setup();
		if (err) {
			pr_err("rmnet: Cannot setup transports");
			frmnet_deinit_port();
			ports = 0;
			goto out;
		}
		rmnet_initialized = 1;
	}

	for (i = 0; i < ports; i++) {
+17 −0
Original line number Diff line number Diff line
@@ -1471,3 +1471,20 @@ fail_probe:

	return ret;
}
static void frmnet_deinit_port(void)
{
	int i;

	for (i = 0; i < nr_rmnet_ports; i++)
		kfree(rmnet_ports[i].port);

	nr_rmnet_ports = 0;
	no_ctrl_smd_ports = 0;
	no_ctrl_qti_ports = 0;
	no_data_bam_ports = 0;
	no_data_bam2bam_ports = 0;
	no_ctrl_hsic_ports = 0;
	no_data_hsic_ports = 0;
	no_ctrl_hsuart_ports = 0;
	no_data_hsuart_ports = 0;
}