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: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Peter Naulls <peter@mushroomnetworks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by Alan Stern and committed by Greg Kroah-Hartman 7bae0a07 c3325eb1

+2 -3
+2 -3
drivers/usb/serial/sierra.c
··· 814 return 0; 815 } 816 817 - static void sierra_disconnect(struct usb_serial *serial) 818 { 819 int i; 820 struct usb_serial_port *port; ··· 830 if (!portdata) 831 continue; 832 kfree(portdata); 833 - usb_set_serial_port_data(port, NULL); 834 } 835 } 836 ··· 852 .tiocmget = sierra_tiocmget, 853 .tiocmset = sierra_tiocmset, 854 .attach = sierra_startup, 855 - .disconnect = sierra_disconnect, 856 .read_int_callback = sierra_instat_callback, 857 }; 858
··· 814 return 0; 815 } 816 817 + static void sierra_release(struct usb_serial *serial) 818 { 819 int i; 820 struct usb_serial_port *port; ··· 830 if (!portdata) 831 continue; 832 kfree(portdata); 833 } 834 } 835 ··· 853 .tiocmget = sierra_tiocmget, 854 .tiocmset = sierra_tiocmset, 855 .attach = sierra_startup, 856 + .release = sierra_release, 857 .read_int_callback = sierra_instat_callback, 858 }; 859