Skip to content

Commit

Permalink
USB: double put_tty_driver(gs_tty_driver) in gserial_setup()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roel Kluin authored and Greg Kroah-Hartman committed Sep 23, 2009
1 parent 2912282 commit 48d3167
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/usb/gadget/u_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 48d3167

Please sign in to comment.