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>
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);