]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
efivars: no need to convert ENOENT → ENODATA twice
authorLennart Poettering <lennart@poettering.net>
Tue, 22 Mar 2022 15:33:09 +0000 (16:33 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 24 Mar 2022 14:20:49 +0000 (15:20 +0100)
read_efi_options_variable() already does this, don#t do it again.

src/basic/efivars.c

index 470369c0cbbb008ab93257963ec69d40e8b8dfc9..92b11cb2c57d999a8be2635d8c86f089e334f1e3 100644 (file)
@@ -439,9 +439,7 @@ int systemd_efi_options_efivarfs_if_newer(char **line) {
 
         r = read_efi_options_variable(line);
         if (r < 0)
-                log_warning_errno(r, "Failed to read SystemdOptions EFI variable: %m");
-        if (r == -ENOENT)
-                return -ENODATA;
-        return r;
+                return log_warning_errno(r, "Failed to read SystemdOptions EFI variable: %m");
+        return 0;
 }
 #endif