Skip to content
Snippets Groups Projects
Commit d550e82e authored by Tom Rini's avatar Tom Rini
Browse files

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: default avatarMarek Vasut <marex@denx.de>
Reviewed-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: default avatarPeng Fan <van.freenix@gmail.com>
Reviewed-by: default avatarStefano Babic <sbabic@denx.de>
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
parent 5f89a15e
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment