Skip to content

Commit db6e918

Browse files
jhovoldgregkh
authored andcommitted
USB: pl2303: return errors from usb_submit_urb in open
Return errors from usb_submit_urb rather than EPROTO on errors in open. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ac3695f commit db6e918

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/usb/serial/pl2303.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ static int pl2303_open(struct tty_struct *tty, struct usb_serial_port *port)
507507
result = usb_serial_generic_submit_read_urb(port, GFP_KERNEL);
508508
if (result) {
509509
pl2303_close(port);
510-
return -EPROTO;
510+
return result;
511511
}
512512

513513
dbg("%s - submitting interrupt urb", __func__);
@@ -516,7 +516,7 @@ static int pl2303_open(struct tty_struct *tty, struct usb_serial_port *port)
516516
dev_err(&port->dev, "%s - failed submitting interrupt urb,"
517517
" error %d\n", __func__, result);
518518
pl2303_close(port);
519-
return -EPROTO;
519+
return result;
520520
}
521521
port->port.drain_delay = 256;
522522
return 0;

0 commit comments

Comments
 (0)