Commit e0ca312a authored by Daniele Bellucci's avatar Daniele Bellucci Committed by Greg Kroah-Hartman

[PATCH] USB: PATCH 10/19 Audit usb_register/usb_serial_register under divers/usb/serial

parent 0f32ea83
...@@ -197,15 +197,36 @@ struct keyspan_port_private { ...@@ -197,15 +197,36 @@ struct keyspan_port_private {
/* Functions used by new usb-serial code. */ /* Functions used by new usb-serial code. */
static int __init keyspan_init (void) static int __init keyspan_init (void)
{ {
usb_serial_register (&keyspan_pre_device); int retval;
usb_serial_register (&keyspan_1port_device); retval = usb_serial_register(&keyspan_pre_device);
usb_serial_register (&keyspan_2port_device); if (retval)
usb_serial_register (&keyspan_4port_device); goto failed_pre_device_register;
usb_register (&keyspan_driver); retval = usb_serial_register(&keyspan_1port_device);
if (retval)
goto failed_1port_device_register;
retval = usb_serial_register(&keyspan_2port_device);
if (retval)
goto failed_2port_device_register;
retval = usb_serial_register(&keyspan_4port_device);
if (retval)
goto failed_4port_device_register;
retval = usb_register(&keyspan_driver);
if (retval)
goto failed_usb_register;
info(DRIVER_VERSION ":" DRIVER_DESC); info(DRIVER_VERSION ":" DRIVER_DESC);
return 0; return 0;
failed_usb_register:
usb_serial_deregister(&keyspan_4port_device);
failed_4port_device_register:
usb_serial_deregister(&keyspan_2port_device);
failed_2port_device_register:
usb_serial_deregister(&keyspan_1port_device);
failed_1port_device_register:
usb_serial_deregister(&keyspan_pre_device);
failed_pre_device_register:
return retval;
} }
static void __exit keyspan_exit (void) static void __exit keyspan_exit (void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment