Messages in this thread Patch in this message | | | Date | Mon, 27 Sep 2004 13:54:59 -0300 | From | "Luiz Fernando N. Capitulino" <> | Subject | [PATCH 4/5]: 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
(against 2.6.9-rc2-mm4)
Signed-off-by: Luiz Capitulino <lcapitulino@conectiva.com.br>
drivers/usb/serial/usb-serial.c | 18 +++++++----------- 1 files changed, 7 insertions(+), 11 deletions(-)
diff -X /home/lcapitulino/kernels/2.6/dontdiff -Nparu a/drivers/usb/serial/usb-serial.c a~/drivers/usb/serial/usb-serial.c --- a/drivers/usb/serial/usb-serial.c 2004-09-26 13:42:29.000000000 -0300 +++ a~/drivers/usb/serial/usb-serial.c 2004-09-26 13:43:27.000000000 -0300 @@ -1338,17 +1338,13 @@ int usb_serial_register(struct usb_seria /* 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; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |