Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH] HID: logitech-dj: Fix check of logi_dj_recv_query_paired_devices()
@ 2019-07-25 14:57 YueHaibing
  2019-07-31 10:59 ` Petr Vorel
  0 siblings, 1 reply; 9+ messages in thread
From: YueHaibing @ 2019-07-25 14:57 UTC (permalink / raw)
  To: jikos, benjamin.tissoires, hdegoede; +Cc: linux-kernel, linux-input, YueHaibing

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@huawei.com>
---
 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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-08-05  9:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-25 14:57 [PATCH] HID: logitech-dj: Fix check of logi_dj_recv_query_paired_devices() YueHaibing
2019-07-31 10:59 ` Petr Vorel
2019-07-31 11:06   ` Petr Vorel
2019-07-31 11:29     ` Hans de Goede
2019-07-31 11:41       ` Yuehaibing
2019-07-31 11:46       ` Petr Vorel
2019-08-05  8:51       ` Jiri Kosina
2019-08-05  8:55         ` Hans de Goede
2019-08-05  9:27           ` Benjamin Tissoires

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox