]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
boot: bootmeth_efi: Refactor distro_efi_try_bootflow_files return logic
authorKory Maincent (TI.com) <kory.maincent@bootlin.com>
Thu, 30 Oct 2025 16:45:12 +0000 (17:45 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 3 Nov 2025 16:02:39 +0000 (10:02 -0600)
Simplify the return path in distro_efi_try_bootflow_files() to prepare
for adding extension board support in a subsequent commit.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
boot/bootmeth_efi.c

index 0af23df3a4a551adc230469041eadac885be7424..64de5c08b7b700a03a9d0acbe41763541feed698 100644 (file)
@@ -148,25 +148,26 @@ static int distro_efi_try_bootflow_files(struct udevice *dev,
                        return log_msg_ret("fil", -ENOMEM);
        }
 
-       if (!ret) {
-               bflow->fdt_size = size;
-               bflow->fdt_addr = fdt_addr;
-
-               /*
-                * TODO: Apply extension overlay
-                *
-                * Here we need to load and apply the extension overlay. This is
-                * not implemented. See do_extension_apply(). The extension
-                * stuff needs an implementation in boot/extension.c so it is
-                * separate from the command code. Really the extension stuff
-                * should use the device tree and a uclass / driver interface
-                * rather than implementing its own list
-                */
-       } else {
+       if (ret) {
                log_debug("No device tree available\n");
                bflow->flags |= BOOTFLOWF_USE_BUILTIN_FDT;
+               return 0;
        }
 
+       bflow->fdt_size = size;
+       bflow->fdt_addr = fdt_addr;
+
+       /*
+        * TODO: Apply extension overlay
+        *
+        * Here we need to load and apply the extension overlay. This is
+        * not implemented. See do_extension_apply(). The extension
+        * stuff needs an implementation in boot/extension.c so it is
+        * separate from the command code. Really the extension stuff
+        * should use the device tree and a uclass / driver interface
+        * rather than implementing its own list
+        */
+
        return 0;
 }