diff options
author | Heinrich Schuchardt | 2023-09-06 14:25:11 +0200 |
---|---|---|
committer | Heinrich Schuchardt | 2023-09-09 06:12:47 +0200 |
commit | 323e91a1832b7f10e8966b2fd43b71cf27abefa7 (patch) | |
tree | e42856673f424d3d5692190bfbdf331d405d674d /common | |
parent | c0c08be5468cb26db597932bc69c4eda1129841d (diff) |
spl: undefined return value in spl_blk_load_image
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>
Reviewed-by: Xavier Drudis Ferran <xdrudis@tinet.cat>
Diffstat (limited to 'common')
-rw-r--r-- | common/spl/spl_blk_fs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/spl/spl_blk_fs.c b/common/spl/spl_blk_fs.c index eb6f5266896..ea5d1a51d9f 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); |