summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2016-05-23 11:51:13 -0400
committerTom Rini <[email protected]>2016-05-23 11:51:13 -0400
commitd550e82e4efebf5995809e38e8fb029b8fe6e861 (patch)
treebe83b47399044d43e439256cd132407db9ed2ca1 /common
parent5f89a15e1630e9050c8b1b5307ccd800e4596ce5 (diff)
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 <[email protected]> Reviewed-by: Fabio Estevam <[email protected]> Reviewed-by: Peng Fan <[email protected]> Reviewed-by: Stefano Babic <[email protected]> Reviewed-by: Tom Rini <[email protected]>
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl_fat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c
index 338ea2f092b..5b0d96925ed 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);