[PATCH 15/18] USB: pl2303: return errors from usb_submit_urb in open

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Return errors from usb_submit_urb rather than EPROTO on errors in open.

Signed-off-by: Johan Hovold <jhovold@xxxxxxxxx>
---
 drivers/usb/serial/pl2303.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 1d33260..9a27a78 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -509,7 +509,7 @@ static int pl2303_open(struct tty_struct *tty, struct usb_serial_port *port)
 	result = usb_serial_generic_submit_read_urb(port, GFP_KERNEL);
 	if (result) {
 		pl2303_close(port);
-		return -EPROTO;
+		return result;
 	}
 
 	dbg("%s - submitting interrupt urb", __func__);
@@ -518,7 +518,7 @@ static int pl2303_open(struct tty_struct *tty, struct usb_serial_port *port)
 		dev_err(&port->dev, "%s - failed submitting interrupt urb,"
 			" error %d\n", __func__, result);
 		pl2303_close(port);
-		return -EPROTO;
+		return result;
 	}
 	port->port.drain_delay = 256;
 	return 0;
-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux