USB: ch341: forward USB errors to USB serial core
authorJohan Hovold <jhovold@gmail.com>
Thu, 10 Nov 2011 13:58:28 +0000 (14:58 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 16 Mar 2017 02:18:40 +0000 (02:18 +0000)
commit 06946a66546aedfc5192645e8fc56081441e378c upstream.

All error messages from stack in open are being forwarded except for
one call to usb_submit_urb. Change this for consistency.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/serial/ch341.c

index c4d95b0..2a874fd 100644 (file)
@@ -339,7 +339,7 @@ static int ch341_open(struct tty_struct *tty, struct usb_serial_port *port)
                dev_err(&port->dev, "%s - failed submitting interrupt urb,"
                        " error %d\n", __func__, r);
                ch341_close(port);
                dev_err(&port->dev, "%s - failed submitting interrupt urb,"
                        " error %d\n", __func__, r);
                ch341_close(port);
-               return -EPROTO;
+               goto out;
        }
 
        r = usb_serial_generic_open(tty, port);
        }
 
        r = usb_serial_generic_open(tty, port);