mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-18 19:04:38 +00:00
blk: host_dev: Fix error code in host_sb_attach_file()
This error path should return -EINVAL instead of success.
Fixes: e261fbf347
("blk: host_dev: Sanity check on the size of host backing file")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
This commit is contained in:
parent
c59720c5f4
commit
e5e7d8bbcf
1 changed files with 1 additions and 0 deletions
|
@ -61,6 +61,7 @@ static int host_sb_attach_file(struct udevice *dev, const char *filename)
|
||||||
if (size % desc->blksz) {
|
if (size % desc->blksz) {
|
||||||
printf("The size of host backing file '%s' is not multiple of "
|
printf("The size of host backing file '%s' is not multiple of "
|
||||||
"the device block size\n", filename);
|
"the device block size\n", filename);
|
||||||
|
ret = -EINVAL;
|
||||||
goto err_fname;
|
goto err_fname;
|
||||||
}
|
}
|
||||||
desc->lba = size / desc->blksz;
|
desc->lba = size / desc->blksz;
|
||||||
|
|
Loading…
Add table
Reference in a new issue