Commit 48d31677 authored by Roel Kluin's avatar Roel Kluin Committed by Greg Kroah-Hartman

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: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2912282c
...@@ -1114,7 +1114,6 @@ int __init gserial_setup(struct usb_gadget *g, unsigned count) ...@@ -1114,7 +1114,6 @@ int __init gserial_setup(struct usb_gadget *g, unsigned count)
/* export the driver ... */ /* export the driver ... */
status = tty_register_driver(gs_tty_driver); status = tty_register_driver(gs_tty_driver);
if (status) { if (status) {
put_tty_driver(gs_tty_driver);
pr_err("%s: cannot register, err %d\n", pr_err("%s: cannot register, err %d\n",
__func__, status); __func__, status);
goto fail; goto fail;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment