diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2023-06-06 11:20:54 +0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2023-06-08 17:00:09 +0200 |
commit | 89e756e3cc8d9c1ebc0f2b2f6912227073d93118 (patch) | |
tree | ee8a5355bb47e34442030b19b857465567bc78fb /drivers/hid/hid-core.c | |
parent | 62c68e7cee332e08e625af3bca3318814086490d (diff) |
HID: fix an error code in hid_check_device_match()
The hid_check_device_match() returns true if we find a match and false
if we don't. But here it returns -ENODEV which becomes true instead
of false.
Fixes: 207733f92661 ("HID: split apart hid_device_probe to make logic more apparent")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-core.c')
-rw-r--r-- | drivers/hid/hid-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 4b7062dcefec..8992e3c1e769 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -2593,7 +2593,7 @@ static bool hid_check_device_match(struct hid_device *hdev, { *id = hid_match_device(hdev, hdrv); if (!*id) - return -ENODEV; + return false; if (hdrv->match) return hdrv->match(hdev, hid_ignore_special_drivers); |