From ba6c9b79945109ec14f17b48e9b1931c037ebc90 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 22 Feb 2021 23:11:28 +0900 Subject: [PATCH] backlight: same_device() may return negative errno --- src/backlight/backlight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c index f9e4f83ab96..2e2938674d7 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. */ -- 2.47.3