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 <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Reviewed-by: Dmitry Torokhov <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 62c68e7 commit 89e756e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)