Commit 18d8fe61 authored by Johan Hovold's avatar Johan Hovold

USB: serial: f81232: drop short control-transfer checks

There's no need to check for short control transfers when sending data
so remove the redundant sanity checks.
Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent 0765590f
......@@ -192,13 +192,9 @@ static int f81232_set_register(struct usb_serial_port *port, u16 reg, u8 val)
tmp,
sizeof(val),
USB_CTRL_SET_TIMEOUT);
if (status != sizeof(val)) {
if (status < 0) {
dev_err(&port->dev, "%s failed status: %d\n", __func__, status);
if (status < 0)
status = usb_translate_errors(status);
else
status = -EIO;
status = usb_translate_errors(status);
} else {
status = 0;
}
......@@ -886,10 +882,6 @@ static int f81534a_ctrl_set_register(struct usb_interface *intf, u16 reg,
status = usb_translate_errors(status);
if (status == -EIO)
continue;
} else if (status != size) {
/* Retry on short transfers */
status = -EIO;
continue;
} else {
status = 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment