projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
USB: serial: do not forward USB specific errors in write
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
usb
/
serial
/
usb-serial.c
diff --git
a/drivers/usb/serial/usb-serial.c
b/drivers/usb/serial/usb-serial.c
index 5c4fcf8d5f98db0efcf29870120e2779279189fa..8c46813b9afa276871c001f4ee236a1445c6032a 100644
(file)
--- a/
drivers/usb/serial/usb-serial.c
+++ b/
drivers/usb/serial/usb-serial.c
@@
-364,6
+364,8
@@
static int serial_write(struct tty_struct *tty, const unsigned char *buf,
/* pass on to the driver specific version of this function */
retval = port->serial->type->write(tty, port, buf, count);
+ if (retval < 0)
+ retval = usb_translate_errors(retval);
exit:
return retval;
}