git.openpandora.org
/
pandora-u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c59720c
)
blk: host_dev: Fix error code in host_sb_attach_file()
author
Dan Carpenter
<dan.carpenter@linaro.org>
Wed, 31 Jan 2024 07:09:52 +0000
(10:09 +0300)
committer
Tom Rini
<trini@konsulko.com>
Tue, 6 Feb 2024 21:31:07 +0000
(16:31 -0500)
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>
drivers/block/host_dev.c
patch
|
blob
|
history
diff --git
a/drivers/block/host_dev.c
b/drivers/block/host_dev.c
index
30c7415
..
5231343
100644
(file)
--- 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;