summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/usb-serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
-rw-r--r--drivers/usb/serial/usb-serial.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 5c4fcf8d5f9..8c46813b9af 100644
--- 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;
}