]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: stm32mp: skip ft_system_setup when the soc node is absent
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Fri, 15 Apr 2022 12:43:23 +0000 (14:43 +0200)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Tue, 10 May 2022 08:56:39 +0000 (10:56 +0200)
The function ft_system_setup shouldn't return an error when the
/soc node is absent in the provided device tree but just skip the
updates.

This patch solves an issue when the U-Boot pytest is executed on board.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
arch/arm/mach-stm32mp/fdt.c

index 91330a68a49f000a31b16bd78eda7b3302ec64c1..b1a4b76566395f240cc25cb25af6c70e0d942e07 100644 (file)
@@ -260,6 +260,9 @@ int ft_system_setup(void *blob, struct bd_info *bd)
        char name[SOC_NAME_SIZE];
 
        soc = fdt_path_offset(blob, "/soc");
+       /* when absent, nothing to do */
+       if (soc == -FDT_ERR_NOTFOUND)
+               return 0;
        if (soc < 0)
                return soc;