diff --git a/src/driver-etekcity.c b/src/driver-etekcity.c index 01cf54a5..e5d335bd 100644 --- a/src/driver-etekcity.c +++ b/src/driver-etekcity.c @@ -665,8 +665,8 @@ etekcity_probe(struct ratbag_device *device) if (active_idx < 0) { log_error(device->ratbag, "Can't talk to the mouse: '%s' (%d)\n", - strerror(-rc), - rc); + strerror(-active_idx), + active_idx); rc = -ENODEV; goto err; } diff --git a/src/driver-roccat.c b/src/driver-roccat.c index 922ece9c..4a9b6ca2 100644 --- a/src/driver-roccat.c +++ b/src/driver-roccat.c @@ -803,8 +803,8 @@ roccat_probe(struct ratbag_device *device) if (active_idx < 0) { log_error(device->ratbag, "Can't talk to the mouse: '%s' (%d)\n", - strerror(-rc), - rc); + strerror(-active_idx), + active_idx); rc = -ENODEV; goto err; }