[PATCH 3.2 091/199] USB: ch341: forward USB errors to USB serial core

From: Ben Hutchings
Date: Fri Mar 10 2017 - 06:53:34 EST


3.2.87-rc1 review patch. If anyone has any objections, please let me know.

------------------

From: Johan Hovold <jhovold@xxxxxxxxx>

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@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
---
drivers/usb/serial/ch341.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/serial/ch341.c
+++ b/drivers/usb/serial/ch341.c
@@ -339,7 +339,7 @@ static int ch341_open(struct tty_struct
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);