mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 13:11:31 +00:00
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: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
a92fd6577e
commit
c309c2da14
1 changed files with 2 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Reference in a new issue