mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
Common:fdt: Check for error return value
Check for negative return value of fdt_noffset from calling boot_get_fdt_fit(). Signed-off-by: Hongwei Zhang <hongweiz@ami.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
9c54729c77
commit
9883df1bbb
1 changed files with 3 additions and 0 deletions
|
@ -407,6 +407,9 @@ int boot_get_fdt(int flag, int argc, char *const argv[], uint8_t arch,
|
|||
&fit_uname_config,
|
||||
arch, &load, &len);
|
||||
|
||||
if (fdt_noffset < 0)
|
||||
goto error;
|
||||
|
||||
images->fit_hdr_fdt = map_sysmem(fdt_addr, 0);
|
||||
images->fit_uname_fdt = fit_uname_fdt;
|
||||
images->fit_noffset_fdt = fdt_noffset;
|
||||
|
|
Loading…
Reference in a new issue