From: Jean-Jacques Hiblot Date: Fri, 15 Sep 2017 10:57:26 +0000 (+0200) Subject: fit: fixed bug in locate_dtb_in_fit() X-Git-Tag: v2017.11-rc2~124 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d56b86eec32a700cdc16170ad8365ee7c6522f0e;p=platform%2Fkernel%2Fu-boot.git 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 Reviewed-by: Tom Rini Reviewed-by: Simon Glass --- diff --git a/common/boot_fit.c b/common/boot_fit.c index ce42931..add65c4 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;