From: T Karthik Reddy Date: Tue, 22 Sep 2020 11:18:53 +0000 (-0600) Subject: microblaze: board: Check return value whlie saving env variables X-Git-Url: http://git.dujemihanovic.xyz/login.html?a=commitdiff_plain;h=d6242edcce52499ee24a1994272ecba63fe96e17;p=u-boot.git microblaze: board: Check return value whlie saving env variables Check and print warning if run time env variables are not saved. Signed-off-by: T Karthik Reddy Signed-off-by: Michal Simek --- diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index 4e569e910d..724c33987b 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -37,6 +37,7 @@ int dram_init(void) int board_late_init(void) { ulong max_size, lowmem_size; + u32 status = 0; #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_SYSRESET_MICROBLAZE) int ret; @@ -58,9 +59,12 @@ int board_late_init(void) /* Linux default LOWMEM_SIZE is 0x30000000 = 768MB */ lowmem_size = gd->ram_base + 768 * 1024 * 1024; - env_set_addr("initrd_high", (void *)min_t(ulong, max_size, - lowmem_size)); - env_set_addr("fdt_high", (void *)min_t(ulong, max_size, lowmem_size)); + status |= env_set_addr("initrd_high", (void *)min_t(ulong, max_size, + lowmem_size)); + status |= env_set_addr("fdt_high", (void *)min_t(ulong, max_size, + lowmem_size)); + if (status) + printf("%s: Saving run time variables FAILED\n", __func__); return 0; }