]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
backlight: reduce indentation a bit
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 22 Feb 2021 14:25:00 +0000 (23:25 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 22 Feb 2021 14:25:00 +0000 (23:25 +0900)
src/backlight/backlight.c

index 2e2938674d7cc1ed37ef0f659a968a55d81fcc24..836dc378508cacb15e3b7b4eb160e29ae8a6ed1e 100644 (file)
@@ -71,11 +71,9 @@ static int find_pci_or_platform_parent(sd_device *device, sd_device **ret) {
                         return -ENODATA;
 
                 c += strspn(c, DIGITS);
-                if (*c == '-') {
+                if (*c == '-' && !STARTSWITH_SET(c, "-LVDS-", "-Embedded DisplayPort-"))
                         /* A connector DRM device, let's ignore all but LVDS and eDP! */
-                        if (!STARTSWITH_SET(c, "-LVDS-", "-Embedded DisplayPort-"))
-                                return -EOPNOTSUPP;
-                }
+                        return -EOPNOTSUPP;
 
         } else if (streq(subsystem, "pci") &&
                    sd_device_get_sysattr_value(parent, "class", &value) >= 0) {