If the u-boot.itb read from SD-card is invalid, fdt_check_header() may be
called with a NULL pointer.
This was observed on an StarFive VisionFive Lite when trying to revover the
board via UART.
Add a missing check in the starfive board code.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: E Shattow <e@freeshell.de>
void spl_perform_fixups(struct spl_image_info *spl_image)
{
/* Update the memory size which read from eeprom or DT */
- fdt_fixup_memory(spl_image->fdt_addr, 0x40000000, gd->ram_size);
+ if (spl_image->fdt_addr)
+ fdt_fixup_memory(spl_image->fdt_addr, 0x40000000, gd->ram_size);
}
static void jh7110_jtag_init(void)