mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
hidraw: do not return success if match failed
rc is set to 0 by ratbag_open_hidraw_node(), and if matched failed, we close the hidraw node and end the loop. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
@@ -1417,10 +1417,9 @@ ratbag_find_hidraw_node(struct ratbag_device *device,
|
||||
goto skip;
|
||||
|
||||
matched = match(device);
|
||||
if (matched == 1) {
|
||||
rc = 0;
|
||||
rc = matched ? 0 : -ENODEV;
|
||||
if (matched == 1)
|
||||
goto out;
|
||||
}
|
||||
|
||||
skip:
|
||||
ratbag_close_hidraw(device);
|
||||
|
||||
Reference in New Issue
Block a user