- log_warning("Failed to parse 'max_brightness' \"%s\": %s",
- max_brightness_str, strerror(-r));
+ log_warning("Failed to parse 'max_brightness' \"%s\": %s", max_brightness_str, strerror(-r));
+ return 0;
+ }
+
+ if (max_brightness <= 0) {
+ log_warning("Maximum brightness is 0, ignoring device.");