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

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

parent e0ca312a
...@@ -876,16 +876,39 @@ static struct usb_serial_device_type keyspan_pda_device = { ...@@ -876,16 +876,39 @@ static struct usb_serial_device_type keyspan_pda_device = {
static int __init keyspan_pda_init (void) static int __init keyspan_pda_init (void)
{ {
usb_serial_register (&keyspan_pda_device); int retval;
retval = usb_serial_register(&keyspan_pda_device);
if (retval)
goto failed_pda_register;
#ifdef KEYSPAN #ifdef KEYSPAN
usb_serial_register (&keyspan_pda_fake_device); retval = usb_serial_register(&keyspan_pda_fake_device);
if (retval)
goto failed_pda_fake_register;
#endif #endif
#ifdef XIRCOM #ifdef XIRCOM
usb_serial_register (&xircom_pgs_fake_device); retval = usb_serial_register(&xircom_pgs_fake_device);
if (retval)
goto failed_xircom_register;
#endif #endif
usb_register (&keyspan_pda_driver); retval = usb_register(&keyspan_pda_driver);
if (retval)
goto failed_usb_register;
info(DRIVER_DESC " " DRIVER_VERSION); info(DRIVER_DESC " " DRIVER_VERSION);
return 0; return 0;
failed_usb_register:
#ifdef XIRCOM
usb_serial_deregister(&xircom_pgs_fake_device);
failed_xircom_register:
#endif /* XIRCOM */
#ifdef KEYSPAN
usb_serial_deregister(&keyspan_pda_fake_device);
#endif
#ifdef KEYSPAN
failed_pda_fake_register:
#endif
usb_serial_deregister(&keyspan_pda_device);
failed_pda_register:
return retval;
} }
......
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