aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/u_serial.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2008-07-01 16:18:20 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-21 18:16:48 -0400
commitac90e36592ea5171c4e70f58b39a782d871a7d9f (patch)
tree00cb3eb55e6fa3e08d82b181b07c580260484c2b /drivers/usb/gadget/u_serial.c
parentc24f42276b4c4467e82cdd5a941fb7f9400aeea0 (diff)
usb_gadget: composite cdc gadget fault handling
These two fixes ensure the new "CDC Composite Device" gadget fails cleanly when it's loaded on hardware that can't support this particular gadget driver. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> 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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c
index 88d4f5452c49..abf9505d3a75 100644
--- a/drivers/usb/gadget/u_serial.c
+++ b/drivers/usb/gadget/u_serial.c
@@ -1090,6 +1090,9 @@ void gserial_cleanup(void)
1090 unsigned i; 1090 unsigned i;
1091 struct gs_port *port; 1091 struct gs_port *port;
1092 1092
1093 if (!gs_tty_driver)
1094 return;
1095
1093 /* start sysfs and /dev/ttyGS* node removal */ 1096 /* start sysfs and /dev/ttyGS* node removal */
1094 for (i = 0; i < n_ports; i++) 1097 for (i = 0; i < n_ports; i++)
1095 tty_unregister_device(gs_tty_driver, i); 1098 tty_unregister_device(gs_tty_driver, i);