The spl_parse_image_header() can return 0 and it is not an error.
Only treat non-zero return value as an error.

Signed-off-by: Marek Vasut <ma...@denx.de>
Cc: Fabio Estevam <fabio.este...@nxp.com>
Cc: Peng Fan <van.free...@gmail.com>
Cc: Stefano Babic <sba...@denx.de>
Cc: Tom Rini <tr...@konsulko.com>
---
 common/spl/spl_fat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c
index 338ea2f..5b0d969 100644
--- a/common/spl/spl_fat.c
+++ b/common/spl/spl_fat.c
@@ -58,7 +58,7 @@ int spl_load_image_fat(struct blk_desc *block_dev,
                goto end;
 
        err = spl_parse_image_header(header);
-       if (err <= 0)
+       if (err)
                goto end;
 
        err = file_fat_read(filename, (u8 *)spl_image.load_addr, 0);
-- 
2.7.0

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to