mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-07 17:57:38 +01:00
Prevent crash if random DTB address is passed to bootm
This patch adds bootm_start() return value check. If error status is returned, we do not proceed further to prevent board reset or crash as we still can recover at this point. Signed-off-by: Anatolij Gustschin <agust@denx.de>
This commit is contained in:
parent
cc347801ad
commit
8e02494e8f
2 changed files with 3 additions and 2 deletions
|
|
@ -361,7 +361,8 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
|||
ulong load_end = 0;
|
||||
int ret;
|
||||
|
||||
bootm_start(cmdtp, flag, argc, argv);
|
||||
if (bootm_start(cmdtp, flag, argc, argv))
|
||||
return 1;
|
||||
|
||||
/*
|
||||
* We have reached the point of no return: we are going to
|
||||
|
|
|
|||
|
|
@ -1516,7 +1516,7 @@ int boot_get_fdt (int flag, int argc, char *argv[], bootm_headers_t *images,
|
|||
}
|
||||
break;
|
||||
default:
|
||||
fdt_error ("Did not find a cmdline Flattened Device Tree");
|
||||
puts ("ERROR: Did not find a cmdline Flattened Device Tree\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue