USB: double put_tty_driver(gs_tty_driver) in gserial_setup()
authorRoel Kluin <roel.kluin@gmail.com>
Tue, 25 Aug 2009 08:26:57 +0000 (10:26 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 23 Sep 2009 13:46:37 +0000 (06:46 -0700)
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>
drivers/usb/gadget/u_serial.c

index fc6e709..adf8260 100644 (file)
@@ -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;