mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-06 22:55:11 +00:00
USB: pl2303: add error handling to set_control_lines
Add error handling to set_control_lines. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
362eb02603
commit
a6ec8245bf
1 changed files with 4 additions and 3 deletions
|
@ -269,12 +269,13 @@ static int pl2303_set_control_lines(struct usb_serial_port *port, u8 value)
|
||||||
struct usb_device *dev = port->serial->dev;
|
struct usb_device *dev = port->serial->dev;
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
|
dev_dbg(&port->dev, "%s - %02x\n", __func__, value);
|
||||||
|
|
||||||
retval = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
|
retval = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
|
||||||
SET_CONTROL_REQUEST, SET_CONTROL_REQUEST_TYPE,
|
SET_CONTROL_REQUEST, SET_CONTROL_REQUEST_TYPE,
|
||||||
value, 0, NULL, 0, 100);
|
value, 0, NULL, 0, 100);
|
||||||
|
if (retval)
|
||||||
dev_dbg(&port->dev, "%s - value = %d, retval = %d\n", __func__,
|
dev_err(&port->dev, "%s - failed: %d\n", __func__, retval);
|
||||||
value, retval);
|
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue