summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraxel lin <axel.lin@gmail.com>2011-08-25 09:42:09 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-08-26 23:20:30 -0700
commit7b727acc412c9320dc56a0fd7312febf8710ac0e (patch)
tree2ea966b07efde53952e653fae09e1f6e47344ecd
parent1fab84aa635572fbd74df8fd4fd25ea0a24c76e5 (diff)
downloadtalos-obmc-linux-7b727acc412c9320dc56a0fd7312febf8710ac0e.tar.gz
talos-obmc-linux-7b727acc412c9320dc56a0fd7312febf8710ac0e.zip
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 <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r--drivers/input/misc/cm109.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/misc/cm109.c b/drivers/input/misc/cm109.c
index b09c7d127219..ab860511f016 100644
--- a/drivers/input/misc/cm109.c
+++ b/drivers/input/misc/cm109.c
@@ -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);
}
OpenPOWER on IntegriCloud