]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/shared/efivars.c
coccinelle: make use of SYNTHETIC_ERRNO
[thirdparty/systemd.git] / src / shared / efivars.c
index 6815fc69b82a342001ac3b01be726a9fdc240b5e..cb9e13c15f5a6b504dd72b54d4c9af1b523ad485 100644 (file)
@@ -875,10 +875,9 @@ int efi_loader_get_features(uint64_t *ret) {
         if (r < 0)
                 return r;
 
-        if (s != sizeof(uint64_t)) {
-                log_debug("LoaderFeatures EFI variable doesn't have the right size.");
-                return -EINVAL;
-        }
+        if (s != sizeof(uint64_t))
+                return log_debug_errno(SYNTHETIC_ERRNO(EINVAL),
+                                       "LoaderFeatures EFI variable doesn't have the right size.");
 
         memcpy(ret, v, sizeof(uint64_t));
         return 0;