]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
board: mpfs_icicle: fix pointer assignment in board_fdt_blob_setup()
authorJamie Gibbons <jamie.gibbons@microchip.com>
Tue, 30 Sep 2025 15:45:34 +0000 (16:45 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 30 Sep 2025 16:10:08 +0000 (10:10 -0600)
Correct the assignment in board_fdt_blob_setup() to use *fdtp instead of
fdtp, ensuring the caller receives the correct FDT address. This
resolves an issue where the device tree pointer was not properly set due
to assigning to the local parameter rather than the dereferenced
pointer.

Fixes: 7c16ebba1ed ("board: mpfs_icicle: implement board_fdt_blob_setup()/board_fit_config_name_match()")
Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
board/microchip/mpfs_icicle/mpfs_icicle.c

index 739a9b6cd76a262ac168558eeff3d66af0eb68db..c99207bc89b744361a93a08c6d08fda37d6461db 100644 (file)
@@ -74,7 +74,7 @@ int board_fit_config_name_match(const char *name)
 
 int board_fdt_blob_setup(void **fdtp)
 {
-       fdtp = (void *)_end;
+       *fdtp = (void *)_end;
 
        /*
         * The devicetree provided by the previous stage is very minimal due to
@@ -85,7 +85,7 @@ int board_fdt_blob_setup(void **fdtp)
         */
        if (IS_ENABLED(CONFIG_OF_BOARD) && !IS_ENABLED(CONFIG_MULTI_DTB_FIT)) {
                if (gd->arch.firmware_fdt_addr)
-                       fdtp = (void *)(uintptr_t)gd->arch.firmware_fdt_addr;
+                       *fdtp = (void *)(uintptr_t)gd->arch.firmware_fdt_addr;
        }
 
        return 0;