mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-09 22:40:15 +01:00
pad: don't print a clobbered errno
is_litest_device() may change errno since it calls into libudev. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1069>
This commit is contained in:
parent
54f3733b76
commit
0c782c4084
1 changed files with 4 additions and 4 deletions
|
|
@ -213,15 +213,15 @@ pad_group_new(struct pad_dispatch *pad,
|
|||
struct pad_mode_led *led;
|
||||
|
||||
led = pad_led_new(libinput, syspath, group_index, nleds);
|
||||
if (!led)
|
||||
if (!led) {
|
||||
rc = -errno;
|
||||
goto error;
|
||||
|
||||
}
|
||||
list_insert(&group->led_list, &led->link);
|
||||
}
|
||||
|
||||
rc = pad_led_group_get_mode(group);
|
||||
if (rc < 0) {
|
||||
errno = -rc;
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
|
@ -233,7 +233,7 @@ error:
|
|||
if (!is_litest_device(pad->device))
|
||||
evdev_log_error(pad->device,
|
||||
"unable to init LED group: %s\n",
|
||||
strerror(errno));
|
||||
strerror(-rc));
|
||||
pad_led_group_destroy(&group->base);
|
||||
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue