mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-11 23:23:52 +08:00
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 <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
ac3695fb74
commit
db6e9186c9
@ -507,7 +507,7 @@ static int pl2303_open(struct tty_struct *tty, struct usb_serial_port *port)
|
|||||||
result = usb_serial_generic_submit_read_urb(port, GFP_KERNEL);
|
result = usb_serial_generic_submit_read_urb(port, GFP_KERNEL);
|
||||||
if (result) {
|
if (result) {
|
||||||
pl2303_close(port);
|
pl2303_close(port);
|
||||||
return -EPROTO;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
dbg("%s - submitting interrupt urb", __func__);
|
dbg("%s - submitting interrupt urb", __func__);
|
||||||
@ -516,7 +516,7 @@ static int pl2303_open(struct tty_struct *tty, struct usb_serial_port *port)
|
|||||||
dev_err(&port->dev, "%s - failed submitting interrupt urb,"
|
dev_err(&port->dev, "%s - failed submitting interrupt urb,"
|
||||||
" error %d\n", __func__, result);
|
" error %d\n", __func__, result);
|
||||||
pl2303_close(port);
|
pl2303_close(port);
|
||||||
return -EPROTO;
|
return result;
|
||||||
}
|
}
|
||||||
port->port.drain_delay = 256;
|
port->port.drain_delay = 256;
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user