From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Cc: <yukuai3@huawei.com>, <richard@nod.at>, <vigneshr@ti.com>,
<linux-mtd@lists.infradead.org>
Subject: Re: [PATCH] mtd: mtd_oobtest: fix error return code in mtd_oobtest_init()
Date: Thu, 8 Apr 2021 16:29:06 +0200 [thread overview]
Message-ID: <20210408162906.0ac844d7@xps13> (raw)
In-Reply-To: <20210408142413.748040-1-zhangxiaoxu5@huawei.com>
Hi Zhang,
Zhang Xiaoxu <zhangxiaoxu5@huawei.com> wrote on Thu, 8 Apr 2021
10:24:13 -0400:
> 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: zhangxiaoxu 00467499 <zhangxiaoxu5@huawei.com>
^^^^^^^^^^^^^^
Can you please use your real name here?
> ---
> 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;
> }
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
prev parent reply other threads:[~2021-04-08 14:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-08 14:24 [PATCH] mtd: mtd_oobtest: fix error return code in mtd_oobtest_init() Zhang Xiaoxu
2021-04-08 14:29 ` Miquel Raynal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210408162906.0ac844d7@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=linux-mtd@lists.infradead.org \
--cc=richard@nod.at \
--cc=vigneshr@ti.com \
--cc=yukuai3@huawei.com \
--cc=zhangxiaoxu5@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox