mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-13 00:17:23 +00:00
spl: blk_fs: Fix uninitialized return value when we can't get a blk_desc
Initialize ret to avoid returning garbage if blk_get_devnum_by_uclass_id
fails.
Fixes: 8ce6a2e175
("spl: blk: Support loading images from fs")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
5e6a112e11
commit
1e86296f7f
1 changed files with 1 additions and 1 deletions
|
@ -50,7 +50,7 @@ int spl_blk_load_image(struct spl_image_info *spl_image,
|
|||
struct blk_desc *blk_desc;
|
||||
loff_t actlen, filesize;
|
||||
struct blk_dev dev;
|
||||
int ret;
|
||||
int ret = -ENODEV;
|
||||
|
||||
blk_desc = blk_get_devnum_by_uclass_id(uclass_id, devnum);
|
||||
if (!blk_desc) {
|
||||
|
|
Loading…
Reference in a new issue