diff options
author | Jean-Jacques Hiblot <jjhiblot@ti.com> | 2017-09-15 13:57:26 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-10-06 04:31:04 +0300 |
commit | d56b86eec32a700cdc16170ad8365ee7c6522f0e (patch) | |
tree | 529a13d5c6d7a1025208a5a85be8bc1509b15de0 /common | |
parent | 906a9dbbcba85e8b02414c960c75103cc4755102 (diff) | |
download | u-boot-d56b86eec32a700cdc16170ad8365ee7c6522f0e.tar.xz |
fit: fixed bug in locate_dtb_in_fit()
If the dtb is the first data of the FIT, the its offset is 0x0. Change the
test to '<' instead of '<='
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/boot_fit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/boot_fit.c b/common/boot_fit.c index ce4293184a..add65c4bae 100644 --- a/common/boot_fit.c +++ b/common/boot_fit.c @@ -73,7 +73,7 @@ void *locate_dtb_in_fit(const void *fit) ret = fdt_offset(fit); - if (ret <= 0) + if (ret < 0) return NULL; else return (void *)fit+size+ret; |