ChangeSet 1.1939.1.56, 2004/09/29 12:49:52-07:00, [EMAIL PROTECTED]

[PATCH] usb-serial: usb_serial_register() cleanup.

 usb_serial_register() cleanup

1) CodingStyle in the call of usb_serial_bus_register()
2) The goto and the duplicate `return retval' are not necessary


Signed-off-by: Luiz Capitulino <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


 drivers/usb/serial/usb-serial.c |   18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)


diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
--- a/drivers/usb/serial/usb-serial.c   2004-10-19 08:08:39 -07:00
+++ b/drivers/usb/serial/usb-serial.c   2004-10-19 08:08:39 -07:00
@@ -1338,17 +1338,13 @@
        /* Add this device to our list of devices */
        list_add(&new_device->driver_list, &usb_serial_driver_list);
 
-       retval =  usb_serial_bus_register (new_device);
-
-       if (retval)
-               goto error;
-
-       info("USB Serial support registered for %s", new_device->name);
-
-       return retval;
-error:
-       err("problem %d when registering driver %s", retval, new_device->name);
-       list_del(&new_device->driver_list);
+       retval = usb_serial_bus_register(new_device);
+       if (retval) {
+               err("problem %d when registering driver %s", retval, new_device->name);
+               list_del(&new_device->driver_list);
+       }
+       else
+               info("USB Serial support registered for %s", new_device->name);
 
        return retval;
 }



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to