summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/upd78f0730.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2021-01-18 12:14:22 +0100
committerJohan Hovold <johan@kernel.org>2021-01-18 14:26:32 +0100
commit2dc0e7c37549038444a5202e028ff5625c764012 (patch)
tree4c21c97cc8e477895548c11395d40c5c241e5b30 /drivers/usb/serial/upd78f0730.c
parentf7de9b64265faafe96c2533ddfcc1ad7b2e8080d (diff)
USB: serial: upd78f0730: drop short control-transfer check
There's no need to check for short control transfers when sending data so remove the redundant sanity check. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/upd78f0730.c')
-rw-r--r--drivers/usb/serial/upd78f0730.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/usb/serial/upd78f0730.c b/drivers/usb/serial/upd78f0730.c
index 0a2268c479af..1ca9c1881621 100644
--- a/drivers/usb/serial/upd78f0730.c
+++ b/drivers/usb/serial/upd78f0730.c
@@ -145,14 +145,11 @@ static int upd78f0730_send_ctl(struct usb_serial_port *port,
kfree(buf);
- if (res != size) {
+ if (res < 0) {
struct device *dev = &port->dev;
dev_err(dev, "failed to send control request %02x: %d\n",
*(u8 *)data, res);
- /* The maximum expected length of a transfer is 6 bytes */
- if (res >= 0)
- res = -EIO;
return res;
}