forked from drath/libratbag
hidraw: Definitely return EINVAL when the device ids don't match
Don't return an undefined errno. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -60,8 +60,10 @@ ratbag_open_hidraw(struct ratbag_device *ratbag)
|
||||
/* Check if the device actually matches the input node */
|
||||
if (info.bustype != ratbag->ids.bustype ||
|
||||
info.vendor != ratbag->ids.vendor ||
|
||||
info.product != ratbag->ids.product)
|
||||
info.product != ratbag->ids.product) {
|
||||
errno = EINVAL;
|
||||
goto err;
|
||||
}
|
||||
|
||||
ratbag->hidraw_fd = fd;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user