diff options
author | Hongwei Zhang <hongweiz@ami.com> | 2020-12-02 14:47:03 -0500 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-12-22 20:39:25 -0700 |
commit | 9883df1bbb8e907f4122a582006eaf441b924276 (patch) | |
tree | d7678f704baf6ca76dbfb46032fa919d471a14fa | |
parent | 9c54729c77c4664474c43b53e545f919e2504e8c (diff) | |
download | u-boot-9883df1bbb8e907f4122a582006eaf441b924276.zip u-boot-9883df1bbb8e907f4122a582006eaf441b924276.tar.gz u-boot-9883df1bbb8e907f4122a582006eaf441b924276.tar.bz2 |
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>
-rw-r--r-- | common/image-fdt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/image-fdt.c b/common/image-fdt.c index 327a8c4..707b44a 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -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; |