Hans de Goede 6fb08f1a5f HID: logitech-dj: Really fix return value of logi_dj_recv_query_hidpp_devices
Commit dbcbabf7da92 ("HID: logitech-dj: fix return value of
logi_dj_recv_query_hidpp_devices") made logi_dj_recv_query_hidpp_devices
return the return value of hid_hw_raw_request instead of unconditionally
returning 0.

But hid_hw_raw_request returns the report-size on a successful request
(and a negative error-code on failure) where as the callers of
logi_dj_recv_query_hidpp_devices expect a 0 return on success.

This commit fixes things so that either the negative error gets returned
or 0 on success, fixing HID++ receivers such as the Logitech nano receivers
no longer working.

Cc: YueHaibing <yuehaibing@huawei.com>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: dbcbabf7da92 ("HID: logitech-dj: fix return value of logi_dj_recv_query_hidpp_devices")
Reported-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reported-by: Rafael J. Wysocki <rjw@rjwysocki.net>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Rafael J. Wysocki <rjw@rjwysocki.net>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Tested-by: Petr Vorel <pvorel@suse.cz>
Reviewed-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2019-08-05 12:49:28 +02:00
..
2019-07-11 11:17:09 -07:00
2019-07-09 10:59:26 -07:00
2019-06-21 09:58:42 -07:00
2019-07-08 11:00:02 +02:00
2019-07-06 10:06:37 -07:00
2019-06-08 12:52:42 -07:00
2019-07-09 09:15:03 -07:00
2019-07-11 14:44:13 -07:00
2019-07-11 15:14:01 -07:00
2019-07-09 08:59:39 -07:00
2019-07-11 15:14:01 -07:00
2019-07-09 08:59:39 -07:00
2019-06-21 09:58:42 -07:00
2019-07-11 15:17:41 -07:00
2019-06-08 12:52:42 -07:00
2019-07-08 09:54:55 -07:00
2019-06-15 13:43:06 -07:00
2019-07-09 08:57:45 -07:00
2019-06-08 17:40:28 +02:00
2019-07-11 15:17:41 -07:00
2019-07-11 15:17:41 -07:00
2019-07-09 10:05:22 -07:00
2019-06-10 18:07:39 +02:00
2019-07-11 15:17:41 -07:00
2019-07-11 15:14:01 -07:00
2019-07-11 15:17:41 -07:00
2019-06-12 14:23:50 +02:00
2019-06-12 14:23:50 +02:00