On Tue, Jun 06, 2023 at 11:20:54AM +0300, Dan Carpenter wrote: > 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@xxxxxxxxxx> > --- > drivers/hid/hid-core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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; Ugh, I goofed up, thank you for noticing this Dan. Reviewed-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx> Thanks. -- Dmitry