提交 7b727acc 编写于 作者: A axel lin 提交者: Dmitry Torokhov

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: NAxel Lin <axel.lin@gmail.com>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 1fab84aa
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册