]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
backlight: same_device() may return negative errno
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 22 Feb 2021 14:11:28 +0000 (23:11 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 22 Feb 2021 14:11:28 +0000 (23:11 +0900)
src/backlight/backlight.c

index f9e4f83ab966f0ae2848a278f521a75578967f9d..2e2938674d7cc1ed37ef0f659a968a55d81fcc24 100644 (file)
@@ -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. */