Input: cm109 - fix checking return value of usb_control_msg
Subsystems (2)
PATCH 1/1 Input: cm109 - fix checking return value of usb_control_msg
If successful, usb_control_msg returns the number of bytes transferred, otherwise a negative error number.
Signed-off-by Axel Lin <[email protected]>
--- drivers/input/misc/cm109.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/input/misc/cm109.c +1 -1
@@ -475,7 +475,7 @@ static void cm109_toggle_buzzer_sync(struct cm109_dev *dev, int on)le16_to_cpu (dev->ctl_req->wIndex), dev->ctl_data, USB_PKT_LEN, USB_CTRL_SET_TIMEOUT); -if (error && error !=EINTR ) +if ((error <0 ) && (error != -EINTR ))err ("%s: usb_control_msg() failed %d" , __func__, error); }
Signature · 1 line
1.7.4.1
Quoted 4 lines · Axel Lin
If successful,
usb_control_msgreturns the number of bytes transferred, otherwise a negative error number.Signed-off-by Axel Lin <[email protected]>
Applied, thanks Axel.
Signature · 1 line
Dmitry