diff options
author | Jon Povey <jon.povey@racelogic.co.uk> | 2010-06-14 19:42:10 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-06-30 08:16:05 -0700 |
commit | b23097b793081358a6d943263c91bae4c955c4e3 (patch) | |
tree | 10537604461025c9983974be9b201b2af15bf003 /drivers/usb | |
parent | 44a0c0190b500ee6bcfc0976fe540f65dee2cd67 (diff) |
USB: g_serial: fix tty cleanup on unload
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@racelogic.co.uk>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/u_serial.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c index a0f79df4c6c..3e8dcb5455e 100644 --- a/drivers/usb/gadget/u_serial.c +++ b/drivers/usb/gadget/u_serial.c @@ -1184,6 +1184,7 @@ void gserial_cleanup(void) n_ports = 0; tty_unregister_driver(gs_tty_driver); + put_tty_driver(gs_tty_driver); gs_tty_driver = NULL; pr_debug("%s: cleaned up ttyGS* support\n", __func__); |