hidpp20drv: fix segfault when a device is not powered on

We were returning 0 and libratbag tried to access the profiles afterward.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
Benjamin Tissoires
2016-03-01 16:59:32 +01:00
parent b54d28ec1a
commit b804e117c1

View File

@@ -797,6 +797,7 @@ hidpp20drv_probe(struct ratbag_device *device)
log_error(device->ratbag,
"Failed to get HID++2.0 device for %s\n",
device->name);
rc = -ENODEV;
goto err;
}