* [PATCH 1/1] spl: undefined return value in spl_blk_load_image
@ 2023-09-06 12:25 Heinrich Schuchardt
2023-09-06 17:55 ` Xavier Drudis Ferran
0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2023-09-06 12:25 UTC (permalink / raw)
To: Tom Rini
Cc: Xavier Drudis Ferran, Sean Anderson, Mayuresh Chitale,
Simon Glass, u-boot, Heinrich Schuchardt
spl_blk_load_image() should not return an uninitialized value if
blk_get_devnum_by_uclass_id() fails.
Fixes: 8ce6a2e17577 ("spl: blk: Support loading images from fs")
Reported-by: Xavier Drudis Ferran <xdrudis@tinet.cat>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
common/spl/spl_blk_fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/spl/spl_blk_fs.c b/common/spl/spl_blk_fs.c
index eb6f526689..ea5d1a51d9 100644
--- a/common/spl/spl_blk_fs.c
+++ b/common/spl/spl_blk_fs.c
@@ -53,7 +53,7 @@ int spl_blk_load_image(struct spl_image_info *spl_image,
blk_desc = blk_get_devnum_by_uclass_id(uclass_id, devnum);
if (!blk_desc) {
printf("blk desc for %d %d not found\n", uclass_id, devnum);
- goto out;
+ return -ENODEV;
}
blk_show_device(uclass_id, devnum);
--
2.40.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] spl: undefined return value in spl_blk_load_image
2023-09-06 12:25 [PATCH 1/1] spl: undefined return value in spl_blk_load_image Heinrich Schuchardt
@ 2023-09-06 17:55 ` Xavier Drudis Ferran
0 siblings, 0 replies; 2+ messages in thread
From: Xavier Drudis Ferran @ 2023-09-06 17:55 UTC (permalink / raw)
To: Heinrich Schuchardt
Cc: Tom Rini, Xavier Drudis Ferran, Sean Anderson, Mayuresh Chitale,
Simon Glass, u-boot
El Wed, Sep 06, 2023 at 02:25:11PM +0200, Heinrich Schuchardt deia:
> spl_blk_load_image() should not return an uninitialized value if
> blk_get_devnum_by_uclass_id() fails.
>
> Fixes: 8ce6a2e17577 ("spl: blk: Support loading images from fs")
> Reported-by: Xavier Drudis Ferran <xdrudis@tinet.cat>
FWIW:
Reviewed-by: Xavier Drudis Ferran <xdrudis@tinet.cat>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> common/spl/spl_blk_fs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/spl/spl_blk_fs.c b/common/spl/spl_blk_fs.c
> index eb6f526689..ea5d1a51d9 100644
> --- a/common/spl/spl_blk_fs.c
> +++ b/common/spl/spl_blk_fs.c
> @@ -53,7 +53,7 @@ int spl_blk_load_image(struct spl_image_info *spl_image,
> blk_desc = blk_get_devnum_by_uclass_id(uclass_id, devnum);
> if (!blk_desc) {
> printf("blk desc for %d %d not found\n", uclass_id, devnum);
> - goto out;
> + return -ENODEV;
> }
>
> blk_show_device(uclass_id, devnum);
> --
> 2.40.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-06 17:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-06 12:25 [PATCH 1/1] spl: undefined return value in spl_blk_load_image Heinrich Schuchardt
2023-09-06 17:55 ` Xavier Drudis Ferran
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox