SPL: fat: Fix spl_parse_image_header() return value handling
PATCH 1/1 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.
--- common/spl/spl_fat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
common/spl/spl_fat.c +1 -1
@@ -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 );
Signature · 1 line
2.7.0
PATCH 1/1 SPL: fat: Fix spl_parse_image_header() return value handling
Quoted 8 lines · Marek Vasut
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]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>Cc Tom Rini <[email protected]>
PATCH 1/1 SPL: fat: Fix spl_parse_image_header() return value handling
In reply to Marek VasutQuoted 8 lines · Marek Vasut
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]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>Cc Tom Rini <[email protected]>
Regards,
Peng.
Quoted 20 lines
---
common/spl/spl_fat.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)common/spl/spl_fat.c +1
-1@@ -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 );Signature · 1 line
2.7.0
PATCH 1/1 SPL: fat: Fix spl_parse_image_header() return value handling
In reply to Marek VasutQuoted 18 lines · Marek Vasut
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]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>Cc Tom Rini <[email protected]>--- common/spl/spl_fat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/spl/spl_fat.c +0
-0
common/spl/spl_fat.c int spl_load_image_fat(struct blk_desc *block_dev, · line 64
Quoted 8 lines
common/spl/spl_fat.c +1
-1@@ -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 );
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 1/1 SPL: fat: Fix spl_parse_image_header() return value handling
In reply to Marek VasutQuoted 8 lines · Marek Vasut
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]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>Cc Tom Rini <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160520/a2bfeb32/attachment.sig>
Hello Marek,
Am 20.05.2016 um 01:45 schrieb Marek Vasut:
Quoted 12 lines
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]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>Cc Tom Rini <[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]>
Quoted 3 lines
--- common/spl/spl_fat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks!
So:
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Quoted 12 lines · Marek Vasut
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]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>Cc Tom Rini <[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]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160523/13cf210b/attachment.sig>
Hi Tom,
Quoted 15 lines · Tom Rini
Quoted 12 lines · Marek Vasut
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]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>Cc Tom Rini <[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]>
Quoted 1 line
Applied to u-boot/master, thanks!
Looks like something went wrong while applying this patch as Marek's authorship got lost:
commit d550e82e4efebf5995809e38e8fb029b8fe6e861
Author: Tom Rini <[email protected]> Date: Mon May 23 11:51:13 2016 -0400
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.
Quoted 18 lines · Fabio Estevam
Hi Tom,
Quoted 15 lines · Tom Rini
Quoted 12 lines · Marek Vasut
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]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>Cc Tom Rini <[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]>
Quoted 4 lines
Quoted 1 line
Applied to u-boot/master, thanks!
Looks like something went wrong while applying this patch as Marek's authorship got lost:
Ah, you're right, nice catch :)
Tom, I don't really care, bug is fixed, you can leave it as it is.
Quoted 15 lines
commit
d550e82e4efebf5995809e38e8fb029b8fe6e861Author: Tom Rini <[email protected]> Date: Mon May 23 11:51:13 2016 -0400SPL: fat: Fix
spl_parse_image_header()return value handlingThe
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]>
Signature · 2 lines
Best regards, Marek Vasut
Quoted 19 lines · Marek Vasut
Quoted 18 lines · Fabio Estevam
Hi Tom,
Quoted 15 lines · Tom Rini
Quoted 12 lines · Marek Vasut
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]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>Cc Tom Rini <[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]>
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Applied to u-boot/master, thanks!
Looks like something went wrong while applying this patch as Marek's authorship got lost:
Ah, you're right, nice catch :)
Tom, I don't really care, bug is fixed, you can leave it as it is.
Ug! Sorry about that, I really don't know how that happened either.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160619/90036fb3/attachment.sig>