ChangeSet 1.1276.22.16, 2003/08/22 15:34:41-07:00, bellucda@tiscali.it [PATCH] USB: PATCH 16/19 Audit usb_register/usb_serial_register under divers/usb/serial drivers/usb/serial/pl2303.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff -Nru a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c --- a/drivers/usb/serial/pl2303.c Tue Sep 2 12:47:17 2003 +++ b/drivers/usb/serial/pl2303.c Tue Sep 2 12:47:17 2003 @@ -768,10 +768,19 @@ static int __init pl2303_init (void) { - usb_serial_register (&pl2303_device); - usb_register (&pl2303_driver); + int retval; + retval = usb_serial_register(&pl2303_device); + if (retval) + goto failed_usb_serial_register; + retval = usb_register(&pl2303_driver); + if (retval) + goto failed_usb_register; info(DRIVER_DESC " " DRIVER_VERSION); return 0; +failed_usb_register: + usb_serial_deregister(&pl2303_device); +failed_usb_serial_register: + return retval; }