UPSTREAM: 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 '<=' Change-Id: Ie6dd1734049f642511db0fc1b19f2af0bec8de04 Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit d56b86eec32a700cdc16170ad8365ee7c6522f0e)
This commit is contained in:
parent
ea5b64c6e7
commit
1481d9f176
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue