diff options
author | Tom Rini <trini@konsulko.com> | 2016-05-23 11:51:13 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-05-23 11:51:13 -0400 |
commit | d550e82e4efebf5995809e38e8fb029b8fe6e861 (patch) | |
tree | be83b47399044d43e439256cd132407db9ed2ca1 /common/spl | |
parent | 5f89a15e1630e9050c8b1b5307ccd800e4596ce5 (diff) | |
download | u-boot-imx-d550e82e4efebf5995809e38e8fb029b8fe6e861.zip u-boot-imx-d550e82e4efebf5995809e38e8fb029b8fe6e861.tar.gz u-boot-imx-d550e82e4efebf5995809e38e8fb029b8fe6e861.tar.bz2 |
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 <marex@denx.de>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Peng Fan <van.freenix@gmail.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common/spl')
-rw-r--r-- | common/spl/spl_fat.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |