forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
93f1a47c4a
commit
2e46b74852
@ -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:
|
||||
usb_serial_deregister(&cypress_hidcom_device);
|
||||
failed_em_register:
|
||||
usb_serial_deregister(&cypress_earthmate_device);
|
||||
|
||||
failed_usb_register:
|
||||
usb_serial_deregister(&cypress_ca42v2_device);
|
||||
failed_ca42v2_register:
|
||||
usb_serial_deregister(&cypress_hidcom_device);
|
||||
failed_hidcom_register:
|
||||
usb_serial_deregister(&cypress_earthmate_device);
|
||||
failed_em_register:
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user