Skip to content
Snippets Groups Projects
Commit c309c2da authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

fdt: Skip checking FDT if the pointer is NULL


If we have no FDT, don't attempt to read from it. This allows sandbox to
run without an FDT if required.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent a92fd657
No related branches found
No related tags found
No related merge requests found
......@@ -354,7 +354,8 @@ int fdtdec_check_fdt(void)
*/
int fdtdec_prepare_fdt(void)
{
if (((uintptr_t)gd->fdt_blob & 3) || fdt_check_header(gd->fdt_blob)) {
if (!gd->fdt_blob || ((uintptr_t)gd->fdt_blob & 3) ||
fdt_check_header(gd->fdt_blob)) {
printf("No valid FDT found - please append one to U-Boot "
"binary, use u-boot-dtb.bin or define "
"CONFIG_OF_EMBED. For sandbox, use -d <file.dtb>\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment