backlight: Avoid error when state restore is disabled
When the state restore is disabled, we would print: "Unknown verb: load" instead of simply skipping loading the state.
This commit is contained in:
@@ -372,9 +372,12 @@ int main(int argc, char *argv[]) {
|
||||
* device probing should be complete), so that the validity
|
||||
* check at boot time doesn't have to be reliable. */
|
||||
|
||||
if (streq(argv[1], "load") && shall_restore_state()) {
|
||||
if (streq(argv[1], "load")) {
|
||||
_cleanup_free_ char *value = NULL;
|
||||
|
||||
if (!shall_restore_state())
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
if (!validate_device(udev, device))
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user