Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: fix error handling for mct_u232

we report errors to the caller. THis patch adds error handling to the driver.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Oliver Neukum and committed by
Greg Kroah-Hartman
2f007de2 9306fff1

+8 -4
+8 -4
drivers/usb/serial/mct_u232.c
··· 438 438 if (retval) { 439 439 err("usb_submit_urb(read bulk) failed pipe 0x%x err %d", 440 440 port->read_urb->pipe, retval); 441 - goto exit; 441 + goto error; 442 442 } 443 443 444 444 port->interrupt_in_urb->dev = port->serial->dev; 445 445 retval = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); 446 - if (retval) 446 + if (retval) { 447 + usb_kill_urb(port->read_urb); 447 448 err(" usb_submit_urb(read int) failed pipe 0x%x err %d", 448 449 port->interrupt_in_urb->pipe, retval); 449 - 450 - exit: 450 + goto error; 451 + } 451 452 return 0; 453 + 454 + error: 455 + return retval; 452 456 } /* mct_u232_open */ 453 457 454 458