From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] SPL: fat: Fix spl_parse_image_header() return value handling
Date: Fri, 20 May 2016 11:36:02 +0200 [thread overview]
Message-ID: <573EDA82.5010408@denx.de> (raw)
In-Reply-To: <1463701524-8354-1-git-send-email-marex@denx.de>
On 20/05/2016 01:45, Marek Vasut wrote:
> 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>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Peng Fan <van.freenix@gmail.com>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Tom Rini <trini@konsulko.com>
> ---
> 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 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);
>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
next prev parent reply other threads:[~2016-05-20 9:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-19 23:45 [U-Boot] [PATCH] SPL: fat: Fix spl_parse_image_header() return value handling Marek Vasut
2016-05-20 0:11 ` Fabio Estevam
2016-05-20 9:31 ` Peng Fan
2016-05-20 9:36 ` Stefano Babic [this message]
2016-05-20 13:02 ` Tom Rini
2016-05-23 12:14 ` [U-Boot] " Heiko Schocher
2016-05-23 22:14 ` Tom Rini
2016-06-17 15:01 ` Fabio Estevam
2016-06-17 15:06 ` Marek Vasut
2016-06-19 13:52 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=573EDA82.5010408@denx.de \
--to=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox