projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da1e6fe
)
mtd: mtd_oobtest: fix error return code in mtd_oobtest_init()
author
Zhang Xiaoxu
<zhangxiaoxu5@huawei.com>
Fri, 9 Apr 2021 01:07:39 +0000
(21:07 -0400)
committer
Miquel Raynal
<miquel.raynal@bootlin.com>
Mon, 10 May 2021 08:44:37 +0000
(10:44 +0200)
Fix to 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: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link:
https://lore.kernel.org/linux-mtd/20210409010739.1021001-1-zhangxiaoxu5@huawei.com
drivers/mtd/tests/oobtest.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/tests/oobtest.c
b/drivers/mtd/tests/oobtest.c
index c71daa89bfce0f26aabcbc0b8d057169109f6af9..590d619d2760ed135ba49d6bb085c2acca7fbadb 100644
(file)
--- a/
drivers/mtd/tests/oobtest.c
+++ b/
drivers/mtd/tests/oobtest.c
@@
-701,6
+701,7
@@
static int __init mtd_oobtest_init(void)
(long long)addr);
errcnt += 1;
if (errcnt > 1000) {
+ err = -EINVAL;
pr_err("error: too many errors\n");
goto out;
}