diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2024-01-31 10:09:52 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-02-06 16:31:07 -0500 |
commit | e5e7d8bbcffb26f5ac9a8fab7909225f527e157d (patch) | |
tree | e781dcc492d960106d9a9926b3261fec3cb0d602 | |
parent | c59720c5f4c592688d2899b352f446703c968666 (diff) | |
download | u-boot-WIP/2024-02-06-assorted-fixes.tar.gz |
blk: host_dev: Fix error code in host_sb_attach_file()WIP/2024-02-06-assorted-fixes
This error path should return -EINVAL instead of success.
Fixes: e261fbf34785 ("blk: host_dev: Sanity check on the size of host backing file")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
-rw-r--r-- | drivers/block/host_dev.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/host_dev.c b/drivers/block/host_dev.c index 30c74157934..52313435a0c 100644 --- a/drivers/block/host_dev.c +++ b/drivers/block/host_dev.c @@ -61,6 +61,7 @@ static int host_sb_attach_file(struct udevice *dev, const char *filename) if (size % desc->blksz) { printf("The size of host backing file '%s' is not multiple of " "the device block size\n", filename); + ret = -EINVAL; goto err_fname; } desc->lba = size / desc->blksz; |