From d550e82e4efebf5995809e38e8fb029b8fe6e861 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 23 May 2016 11:51:13 -0400 Subject: [PATCH] SPL: fat: Fix spl_parse_image_header() return value handling 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 Reviewed-by: Fabio Estevam Reviewed-by: Peng Fan Reviewed-by: Stefano Babic Reviewed-by: Tom Rini --- 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 338ea2f092..5b0d96925e 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.39.5