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

Commit 7bae0a07 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman
Browse files

USB: Sierra: fix oops upon device close



This patch (as1263) fixes a mixup that occurred when conflicting
patches for the sierra driver were merged incorrectly.  The former
sierra_shutdown routine should have been become sierra_release, not
sierra_disconnect.

The symptom this fixes is an oops when the device file is closed after
a Sierra device has been unplugged (Bugzilla #13675).

Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Tested-by: default avatarPeter Naulls <peter@mushroomnetworks.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c3325eb1
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -814,7 +814,7 @@ static int sierra_startup(struct usb_serial *serial)
	return 0;
}

static void sierra_disconnect(struct usb_serial *serial)
static void sierra_release(struct usb_serial *serial)
{
	int i;
	struct usb_serial_port *port;
@@ -830,7 +830,6 @@ static void sierra_disconnect(struct usb_serial *serial)
		if (!portdata)
			continue;
		kfree(portdata);
		usb_set_serial_port_data(port, NULL);
	}
}

@@ -853,7 +852,7 @@ static struct usb_serial_driver sierra_device = {
	.tiocmget          = sierra_tiocmget,
	.tiocmset          = sierra_tiocmset,
	.attach            = sierra_startup,
	.disconnect        = sierra_disconnect,
	.release           = sierra_release,
	.read_int_callback = sierra_instat_callback,
};