]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fdt: Don't overwrite bloblist devicetree
authorSimon Glass <sjg@chromium.org>
Wed, 7 Aug 2024 22:47:22 +0000 (16:47 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 9 Aug 2024 22:03:19 +0000 (16:03 -0600)
When the devicetree comes from a bloblist, it is currently overwritten
by the appended one, if present. It should be preserved.

Adjust the logic to support this.

Fixes: 70fe2385943 ("fdt: Allow the devicetree to come from a bloblist")
Signed-off-by: Simon Glass <sjg@chromium.org>
lib/fdtdec.c

index 6865f78c70d198a6faec2a1c718ac150eafd039c..5edc8dd2f9f02e47329922bb9eed8b1189ea50bb 100644 (file)
@@ -1685,6 +1685,7 @@ int fdtdec_setup(void)
                                gd->fdt_src = FDTSRC_BLOBLIST;
                                log_debug("Devicetree is in bloblist at %p\n",
                                          gd->fdt_blob);
+                               ret = 0;
                        } else {
                                log_debug("No FDT found in bloblist\n");
                                ret = -ENOENT;