Skip to content

Commit

Permalink
spl: undefined return value in spl_blk_load_image
Browse files Browse the repository at this point in the history
spl_blk_load_image() should not return an uninitialized value if
blk_get_devnum_by_uclass_id() fails.

Fixes: 8ce6a2e ("spl: blk: Support loading images from fs")
Reported-by: Xavier Drudis Ferran <[email protected]>
Signed-off-by: Heinrich Schuchardt <[email protected]>
Reviewed-by:  Xavier Drudis Ferran <[email protected]>
  • Loading branch information
xypron committed Sep 9, 2023
1 parent c0c08be commit 323e91a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/spl/spl_blk_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 323e91a

Please sign in to comment.