[PATCH] HID: logitech-dj: Fix check of logi_dj_recv_query_paired_devices()
From: YueHaibing
Date: Thu Jul 25 2019 - 14:07:30 EST
In delayedwork_callback(), logi_dj_recv_query_paired_devices
may return positive value while success now, so check it
correctly.
Fixes: dbcbabf7da92 ("HID: logitech-dj: fix return value of logi_dj_recv_query_hidpp_devices")
Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>
---
drivers/hid/hid-logitech-dj.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index 8cdf373..bf6b289 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -793,7 +793,7 @@ static void delayedwork_callback(struct work_struct *work)
break;
case WORKITEM_TYPE_UNKNOWN:
retval = logi_dj_recv_query_paired_devices(djrcv_dev);
- if (retval) {
+ if (retval < 0) {
hid_err(djrcv_dev->hidpp, "%s: logi_dj_recv_query_paired_devices error: %d\n",
__func__, retval);
}
--
2.7.4