ChangeSet 1.1276.22.2, 2003/08/22 15:31:17-07:00, bellucda@tiscali.it [PATCH] USB: PATCH 2/19 Audit usb_register/usb_serial_register under divers/usb/serial drivers/usb/serial/cyberjack.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff -Nru a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c --- a/drivers/usb/serial/cyberjack.c Tue Sep 2 12:48:16 2003 +++ b/drivers/usb/serial/cyberjack.c Tue Sep 2 12:48:16 2003 @@ -464,13 +464,22 @@ static int __init cyberjack_init (void) { - usb_serial_register (&cyberjack_device); - usb_register (&cyberjack_driver); + int retval; + retval = usb_serial_register(&cyberjack_device); + if (retval) + goto failed_usb_serial_register; + retval = usb_register(&cyberjack_driver); + if (retval) + goto failed_usb_register; info(DRIVER_VERSION " " DRIVER_AUTHOR); info(DRIVER_DESC); return 0; +failed_usb_register: + usb_serial_deregister(&cyberjack_device); +failed_usb_serial_register: + return retval; } static void __exit cyberjack_exit (void)