summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/u_serial.c
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-08-25 12:26:57 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-23 17:46:37 +0400
commit48d316770bd4dcf3d21b53cfa91e358280c31d69 (patch)
tree8a65b7cdfbdb23f6774e0a280f8a14e02d30cd39 /drivers/usb/gadget/u_serial.c
parent2912282c06f219cf1634a624653c445329b37acf (diff)
downloadlinux-48d316770bd4dcf3d21b53cfa91e358280c31d69.tar.xz
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>
Diffstat (limited to 'drivers/usb/gadget/u_serial.c')
-rw-r--r--drivers/usb/gadget/u_serial.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c
index fc6e709f45b1..adf8260c3a6a 100644
--- a/drivers/usb/gadget/u_serial.c
+++ b/drivers/usb/gadget/u_serial.c
@@ -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;