From: Greg KH on
2.6.32-stable review patch. If anyone has any objections, please let us know.


From: Jon Povey <jon.povey(a)>

commit b23097b793081358a6d943263c91bae4c955c4e3 upstream.

Call put_tty_driver() in cleanup function, to fix Oops when trying to open
gadget serial char device after module unload.

Signed-off-by: Jon Povey <jon.povey(a)>
Acked-by: David Brownell <dbrownell(a)>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)>

drivers/usb/gadget/u_serial.c | 1 +
1 file changed, 1 insertion(+)

--- a/drivers/usb/gadget/u_serial.c
+++ b/drivers/usb/gadget/u_serial.c
@@ -1183,6 +1183,7 @@ void gserial_cleanup(void)
n_ports = 0;

+ put_tty_driver(gs_tty_driver);
gs_tty_driver = NULL;

pr_debug("%s: cleaned up ttyGS* support\n", __func__);

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)
More majordomo info at
Please read the FAQ at