Skip to content

Commit 89e756e

Browse files
Dan CarpenterJiri Kosina
authored andcommitted
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: 207733f ("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>
1 parent 62c68e7 commit 89e756e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hid/hid-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2593,7 +2593,7 @@ static bool hid_check_device_match(struct hid_device *hdev,
25932593
{
25942594
*id = hid_match_device(hdev, hdrv);
25952595
if (!*id)
2596-
return -ENODEV;
2596+
return false;
25972597

25982598
if (hdrv->match)
25992599
return hdrv->match(hdev, hid_ignore_special_drivers);

0 commit comments

Comments
 (0)