]> git.sur5r.net Git - u-boot/commitdiff
fit: fixed bug in locate_dtb_in_fit()
authorJean-Jacques Hiblot <jjhiblot@ti.com>
Fri, 15 Sep 2017 10:57:26 +0000 (12:57 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 6 Oct 2017 01:31:04 +0000 (21:31 -0400)
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>
common/boot_fit.c

index ce4293184ae69b44a14f9d9116f0fd8694daf2b5..add65c4baed7431be4c605e9189ef748eabccdca 100644 (file)
@@ -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;