USB: pl2303: return errors from usb_submit_urb in open
authorJohan Hovold <jhovold@gmail.com>
Sun, 6 Nov 2011 18:06:34 +0000 (19:06 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Nov 2011 18:43:14 +0000 (10:43 -0800)
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>
drivers/usb/serial/pl2303.c

index 9083d1e616b4b48c30661ecd4261dfff3c127c14..506d1e930c3ed08308a4358ed96fd137ed6fb6d4 100644 (file)
@@ -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);
        if (result) {
                pl2303_close(port);
-               return -EPROTO;
+               return result;
        }
 
        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,"
                        " error %d\n", __func__, result);
                pl2303_close(port);
-               return -EPROTO;
+               return result;
        }
        port->port.drain_delay = 256;
        return 0;