aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/serial/cypress_m8.c
diff options
context:
space:
mode:
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>2006-11-17 17:49:22 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-12-01 14:23:37 -0800
commit2e46b74852446404d64b0b00ce872724bfa627ab (patch)
tree8594d2e2f42eb40c3eac30bb7fe45adeb89cf045 /drivers/usb/serial/cypress_m8.c
parent93f1a47c4af34c4ee014b3d2aae70089b3b69f72 (diff)
usb: cypress_m8 init error path fix
If at some point cypress_init() fails deregister only the resources that were registered until that point. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/cypress_m8.c')
-rw-r--r--drivers/usb/serial/cypress_m8.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index f2e89a08365..093f303b318 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -1684,15 +1684,14 @@ static int __init cypress_init(void)
info(DRIVER_DESC " " DRIVER_VERSION);
return 0;
+
failed_usb_register:
- usb_deregister(&cypress_driver);
-failed_ca42v2_register:
usb_serial_deregister(&cypress_ca42v2_device);
-failed_hidcom_register:
+failed_ca42v2_register:
usb_serial_deregister(&cypress_hidcom_device);
-failed_em_register:
+failed_hidcom_register:
usb_serial_deregister(&cypress_earthmate_device);
-
+failed_em_register:
return retval;
}