From: Tom Rini Date: Mon, 23 May 2016 15:51:13 +0000 (-0400) Subject: SPL: fat: Fix spl_parse_image_header() return value handling X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=d550e82e4efebf5995809e38e8fb029b8fe6e861;p=u-boot.git 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 --- 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);