Commit 2f007de2 authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman

USB: fix error handling for mct_u232

we report errors to the caller. THis patch adds error handling to the driver.
Signed-off-by: default avatarOliver Neukum <oneukum@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 9306fff1
...@@ -438,17 +438,21 @@ static int mct_u232_open (struct usb_serial_port *port, struct file *filp) ...@@ -438,17 +438,21 @@ static int mct_u232_open (struct usb_serial_port *port, struct file *filp)
if (retval) { if (retval) {
err("usb_submit_urb(read bulk) failed pipe 0x%x err %d", err("usb_submit_urb(read bulk) failed pipe 0x%x err %d",
port->read_urb->pipe, retval); port->read_urb->pipe, retval);
goto exit; goto error;
} }
port->interrupt_in_urb->dev = port->serial->dev; port->interrupt_in_urb->dev = port->serial->dev;
retval = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); retval = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
if (retval) if (retval) {
usb_kill_urb(port->read_urb);
err(" usb_submit_urb(read int) failed pipe 0x%x err %d", err(" usb_submit_urb(read int) failed pipe 0x%x err %d",
port->interrupt_in_urb->pipe, retval); port->interrupt_in_urb->pipe, retval);
goto error;
exit: }
return 0; return 0;
error:
return retval;
} /* mct_u232_open */ } /* mct_u232_open */
......
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