aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2013-12-29 13:23:02 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-03 15:31:47 -0500
commita6ec8245bf09fd51a0561ff372a12473b48d269b (patch)
tree39ab00b6ce34e424f16f69bc1bdf6b1994af5f08 /drivers/usb/serial
parent362eb02603be7bb835c47f2cf585954a5080449d (diff)
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>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/pl2303.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 4058ceec884d..1fe8545e9926 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -269,12 +269,13 @@ static int pl2303_set_control_lines(struct usb_serial_port *port, u8 value)
269 struct usb_device *dev = port->serial->dev; 269 struct usb_device *dev = port->serial->dev;
270 int retval; 270 int retval;
271 271
272 dev_dbg(&port->dev, "%s - %02x\n", __func__, value);
273
272 retval = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), 274 retval = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
273 SET_CONTROL_REQUEST, SET_CONTROL_REQUEST_TYPE, 275 SET_CONTROL_REQUEST, SET_CONTROL_REQUEST_TYPE,
274 value, 0, NULL, 0, 100); 276 value, 0, NULL, 0, 100);
275 277 if (retval)
276 dev_dbg(&port->dev, "%s - value = %d, retval = %d\n", __func__, 278 dev_err(&port->dev, "%s - failed: %d\n", __func__, retval);
277 value, retval);
278 279
279 return retval; 280 return retval;
280} 281}