summaryrefslogtreecommitdiffstats
path: root/src/backlight
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-02-22 15:11:28 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-02-22 15:11:28 +0100
commitba6c9b79945109ec14f17b48e9b1931c037ebc90 (patch)
treeb3ead65246beb616a320b999e6d68d05c0efee9b /src/backlight
parentbacklight: exit earlier when unknown verb is specified (diff)
downloadsystemd-ba6c9b79945109ec14f17b48e9b1931c037ebc90.tar.xz
systemd-ba6c9b79945109ec14f17b48e9b1931c037ebc90.zip
backlight: same_device() may return negative errno
Diffstat (limited to 'src/backlight')
-rw-r--r--src/backlight/backlight.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c
index f9e4f83ab9..2e2938674d 100644
--- a/src/backlight/backlight.c
+++ b/src/backlight/backlight.c
@@ -200,7 +200,7 @@ static int validate_device(sd_device *device) {
if (find_pci_or_platform_parent(other, &other_parent) < 0)
continue;
- if (same_device(parent, other_parent)) {
+ if (same_device(parent, other_parent) > 0) {
const char *device_sysname = NULL, *other_sysname = NULL;
/* Both have the same PCI parent, that means we are out. */