OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c054de1
)
mtd: phram: Fix error return code in phram_setup()
author
Yu Kuai
<yukuai3@huawei.com>
Thu, 8 Apr 2021 13:38:12 +0000
(21:38 +0800)
committer
Miquel Raynal
<miquel.raynal@bootlin.com>
Mon, 10 May 2021 08:44:34 +0000
(10:44 +0200)
Return a negative error code from the error handling case instead
of 0, as done elsewhere in this function.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link:
https://lore.kernel.org/linux-mtd/20210408133812.1209798-1-yukuai3@huawei.com
drivers/mtd/devices/phram.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/devices/phram.c
b/drivers/mtd/devices/phram.c
index
5b04ae6
..
6ed6c51
100644
(file)
--- a/
drivers/mtd/devices/phram.c
+++ b/
drivers/mtd/devices/phram.c
@@
-270,6
+270,7
@@
static int phram_setup(const char *val)
if (len == 0 || erasesize == 0 || erasesize > len
|| erasesize > UINT_MAX || rem) {
parse_err("illegal erasesize or len\n");
+ ret = -EINVAL;
goto error;
}