summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2016-10-19 15:46:39 +0200
committerJohan Hovold <johan@kernel.org>2016-10-24 12:00:19 +0200
commit0407f1ce8fce8e93a249833617221c9905210e5b (patch)
tree5d59b91c6d8fc7f2c8c33ba81c26ddfcd047de4d /drivers/usb/serial
parentUSB: serial: cp210x: clean up CSIZE handling (diff)
downloadlinux-0407f1ce8fce8e93a249833617221c9905210e5b.tar.xz
linux-0407f1ce8fce8e93a249833617221c9905210e5b.zip
USB: serial: cp210x: return -EIO on short control transfers
Return -EIO on short control transfers rather than -EPROTO which is used for lower-level transfer errors. Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/cp210x.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
index 66e095021512..f5ee4ba4b33b 100644
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -401,7 +401,7 @@ static int cp210x_read_reg_block(struct usb_serial_port *port, u8 req,
dev_err(&port->dev, "failed get req 0x%x size %d status: %d\n",
req, bufsize, result);
if (result >= 0)
- result = -EPROTO;
+ result = -EIO;
/*
* FIXME Some callers don't bother to check for error,
@@ -514,7 +514,7 @@ static int cp210x_write_reg_block(struct usb_serial_port *port, u8 req,
dev_err(&port->dev, "failed set req 0x%x size %d status: %d\n",
req, bufsize, result);
if (result >= 0)
- result = -EPROTO;
+ result = -EIO;
}
return result;
@@ -682,7 +682,7 @@ static int cp210x_get_tx_queue_byte_count(struct usb_serial_port *port,
} else {
dev_err(&port->dev, "failed to get comm status: %d\n", result);
if (result >= 0)
- result = -EPROTO;
+ result = -EIO;
}
kfree(sts);