* [v2] mtd: mtd_oobtest: fix error return code in mtd_oobtest_init()
@ 2021-04-09 1:07 Zhang Xiaoxu
2021-05-10 9:09 ` Miquel Raynal
0 siblings, 1 reply; 2+ messages in thread
From: Zhang Xiaoxu @ 2021-04-09 1:07 UTC (permalink / raw)
To: zhangxiaoxu5, yukuai3, miquel.raynal, richard, vigneshr, linux-mtd
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>
---
drivers/mtd/tests/oobtest.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mtd/tests/oobtest.c b/drivers/mtd/tests/oobtest.c
index c71daa89bfce..590d619d2760 100644
--- 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;
}
--
2.25.4
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [v2] mtd: mtd_oobtest: fix error return code in mtd_oobtest_init()
2021-04-09 1:07 [v2] mtd: mtd_oobtest: fix error return code in mtd_oobtest_init() Zhang Xiaoxu
@ 2021-05-10 9:09 ` Miquel Raynal
0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2021-05-10 9:09 UTC (permalink / raw)
To: Zhang Xiaoxu, yukuai3, miquel.raynal, richard, vigneshr, linux-mtd
On Fri, 2021-04-09 at 01:07:39 UTC, Zhang Xiaoxu wrote:
> 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>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-10 9:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 1:07 [v2] mtd: mtd_oobtest: fix error return code in mtd_oobtest_init() Zhang Xiaoxu
2021-05-10 9:09 ` Miquel Raynal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.