From 48d316770bd4dcf3d21b53cfa91e358280c31d69 Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Tue, 25 Aug 2009 10:26:57 +0200 Subject: [PATCH] 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 Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/u_serial.c | 1 - 1 file changed, 1 deletion(-) 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;