USB: ftdi_sio: use error code from usb stack in read_latency_timer

Use same semantics as for write_latency_timer.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Johan Hovold 2009-12-24 12:42:07 +01:00 committed by Greg Kroah-Hartman
parent 551cdbbeb1
commit 4357369d02
1 changed files with 2 additions and 3 deletions

View File

@ -1193,10 +1193,9 @@ static int read_latency_timer(struct usb_serial_port *port)
0, priv->interface,
(char *) &latency, 1, WDR_TIMEOUT);
if (rv < 0) {
if (rv < 0)
dev_err(&port->dev, "Unable to read latency timer: %i\n", rv);
return -EIO;
} else
else
priv->latency = latency;
return rv;
}