ChangeSet 1.1276.22.7, 2003/08/22 15:32:38-07:00, bellucda@tiscali.it [PATCH] USB: PATCH 7/19 Audit usb_register/usb_serial_register under divers/usb/serial drivers/usb/serial/io_ti.c | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff -Nru a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c --- a/drivers/usb/serial/io_ti.c Tue Sep 2 12:47:54 2003 +++ b/drivers/usb/serial/io_ti.c Tue Sep 2 12:47:54 2003 @@ -2679,11 +2679,24 @@ static int __init edgeport_init(void) { - usb_serial_register (&edgeport_1port_device); - usb_serial_register (&edgeport_2port_device); - usb_register (&io_driver); + int retval; + retval = usb_serial_register(&edgeport_1port_device); + if (retval) + goto failed_1port_device_register; + retval = usb_serial_register(&edgeport_2port_device); + if (retval) + goto failed_2port_device_register; + retval = usb_register(&io_driver); + if (retval) + goto failed_usb_register; info(DRIVER_DESC " " DRIVER_VERSION); return 0; +failed_usb_register: + usb_serial_deregister(&edgeport_2port_device); +failed_2port_device_register: + usb_serial_deregister(&edgeport_1port_device); +failed_1port_device_register: + return retval; } static void __exit edgeport_exit (void)