diff --git a/src/login/logind-session-device.c b/src/login/logind-session-device.c index c924f1e0ca..2aff0b7c8c 100644 --- a/src/login/logind-session-device.c +++ b/src/login/logind-session-device.c @@ -95,11 +95,12 @@ static void sd_eviocrevoke(int fd) { assert(fd >= 0); - if (ioctl(fd, EVIOCREVOKE, NULL) < 0) { - - if (errno == EINVAL && !warned) { - log_warning_errno(errno, "Kernel does not support evdev-revocation: %m"); + if (!warned && ioctl(fd, EVIOCREVOKE, NULL) < 0) { + if (errno == EINVAL) { + log_warning_errno(errno, "Kernel does not support evdev-revocation, continuing without revoking device access: %m"); warned = true; + } else if (errno != ENODEV) { + log_warning_errno(errno, "Failed to revoke evdev device, continuing without revoking device access: %m"); } } }