ChangeSet 1.1276.22.1, 2003/08/22 15:31:01-07:00, bellucda@tiscali.it [PATCH] USB: PATCH 1/19 Audit usb_register/usb_serial_register under divers/usb/serial drivers/usb/serial/belkin_sa.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff -Nru a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c --- a/drivers/usb/serial/belkin_sa.c Tue Sep 2 12:48:20 2003 +++ b/drivers/usb/serial/belkin_sa.c Tue Sep 2 12:48:20 2003 @@ -602,10 +602,19 @@ static int __init belkin_sa_init (void) { - usb_serial_register (&belkin_device); - usb_register (&belkin_driver); + int retval; + retval = usb_serial_register(&belkin_device); + if (retval) + goto failed_usb_serial_register; + retval = usb_register(&belkin_driver); + if (retval) + goto failed_usb_register; info(DRIVER_DESC " " DRIVER_VERSION); return 0; +failed_usb_register: + usb_serial_deregister(&belkin_device); +failed_usb_serial_register: + return retval; }