mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 01:49:36 +00:00
USB: double put_tty_driver(gs_tty_driver) in gserial_setup()
If the driver cannot be registered, put_tty_driver(gs_tty_driver) occurred here as well as at label fail. put_tty_driver() already occurs at label fail Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
2912282c06
commit
48d316770b
1 changed files with 0 additions and 1 deletions
|
@ -1114,7 +1114,6 @@ int __init gserial_setup(struct usb_gadget *g, unsigned count)
|
|||
/* export the driver ... */
|
||||
status = tty_register_driver(gs_tty_driver);
|
||||
if (status) {
|
||||
put_tty_driver(gs_tty_driver);
|
||||
pr_err("%s: cannot register, err %d\n",
|
||||
__func__, status);
|
||||
goto fail;
|
||||
|
|
Loading…
Reference in a new issue