[PATCH v3] HID: logitech-dj: Fix mouse detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Now logi_dj_recv_query_paired_devices() will return a positive value
while success, but logi_dj_probe expect zero in case of success, so
set it to 0 before return.

Fixes this error :

   logitech-djreceiver: probe of 0003:046D:C534.0006 failed with error 7

Also prevents the pluging of the mouse dongle in/out to hang the
system.

v2: Drop useless retval = 0 (YueHaibing)

v3: Add explanation (YueHaibing)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@xxxxxxxxx>
Cc: linux-input@xxxxxxxxxxxxxxx
Cc: yuehaibing@xxxxxxxxxx
Cc: hdegoede@xxxxxxxxxx
Cc: benjamin.tissoires@xxxxxxxxxx
Fixes: dbcbabf7da92 ("HID: logitech-dj: fix return value of logi_dj_recv_query_hidpp_devices")
Reviewed-by: YueHaibing <yuehaibing@xxxxxxxxxx>
---
 drivers/hid/hid-logitech-dj.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index 6196217a7d93..8cdf37309ada 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -1736,6 +1736,7 @@ static int logi_dj_probe(struct hid_device *hdev,
 				__func__, retval);
 			goto logi_dj_recv_query_paired_devices_failed;
 		}
+		retval = 0;
 	}
 
 	return retval;
-- 
2.22.0




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux