mirror of
https://github.com/torvalds/linux.git
synced 2024-11-04 11:04:38 +00:00
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>
This commit is contained in:
parent
44a0c0190b
commit
b23097b793
@ -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__);
|
||||
|
Loading…
Reference in New Issue
Block a user