USB: serial: Avoid goto in bulk callbacks
Quoted 12 lines · Ladislav Michl
Refactor bulk callback functions to make use of goto pointless.
Signed-off-by Ladislav Michl <[email protected]>--- drivers/usb/serial/generic.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)drivers/usb/serial/generic.c +0
-0
drivers/usb/serial/generic.c void usb_serial_generic_read_bulk_callback(struct urb *urb) · line 395
Quoted 7 lines
drivers/usb/serial/generic.c +3
-0@@ -389,6 +389,9 @@ void usb_serial_generic_read_bulk_callback(struct urb *urb) urb->actual_length);switch (status) {case 0 : +usb_serial_debug_data (&port->dev, __func__, + urb->actual_length, data); + port->serial->type->process_read_urb (urb);break ;
So as for the ti driver, I prefer keeping the success path out of the switch statement.
Thanks,
Johan
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html