Commit 2ab98bc1 authored by Luiz Capitulino's avatar Luiz Capitulino Committed by Greg Kroah-Hartman

[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: default avatarLuiz Capitulino <lcapitulino@conectiva.com.br>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 10503542
...@@ -1338,17 +1338,13 @@ int usb_serial_register(struct usb_serial_device_type *new_device) ...@@ -1338,17 +1338,13 @@ int usb_serial_register(struct usb_serial_device_type *new_device)
/* Add this device to our list of devices */ /* Add this device to our list of devices */
list_add(&new_device->driver_list, &usb_serial_driver_list); list_add(&new_device->driver_list, &usb_serial_driver_list);
retval = usb_serial_bus_register (new_device); retval = usb_serial_bus_register(new_device);
if (retval) {
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); err("problem %d when registering driver %s", retval, new_device->name);
list_del(&new_device->driver_list); list_del(&new_device->driver_list);
}
else
info("USB Serial support registered for %s", new_device->name);
return retval; return retval;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment