From: Zhen Lei <thunder.leizhen@huawei.com>
To: Jesper Nilsson <jesper.nilsson@axis.com>,
Lars Persson <lars.persson@axis.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
"Guennadi Liakhovetski" <g.liakhovetski@gmx.de>,
Chris Ball <chris@printf.net>,
linux-arm-kernel <linux-arm-kernel@axis.com>,
linux-mmc <linux-mmc@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Cc: Zhen Lei <thunder.leizhen@huawei.com>
Subject: [PATCH 1/1] mmc: usdhi6rol0: fix error return code in usdhi6_probe()
Date: Sat, 8 May 2021 10:03:21 +0800 [thread overview]
Message-ID: <20210508020321.1677-1-thunder.leizhen@huawei.com> (raw)
Fix to return a negative error code from the error handling case instead
of 0, as done elsewhere in this function.
Fixes: 75fa9ea6e3c0 ("mmc: add a driver for the Renesas usdhi6rol0 SD/SDIO host controller")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
drivers/mmc/host/usdhi6rol0.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c
index 615f3d008af1..b9b79b1089a0 100644
--- a/drivers/mmc/host/usdhi6rol0.c
+++ b/drivers/mmc/host/usdhi6rol0.c
@@ -1801,6 +1801,7 @@ static int usdhi6_probe(struct platform_device *pdev)
version = usdhi6_read(host, USDHI6_VERSION);
if ((version & 0xfff) != 0xa0d) {
+ ret = -EPERM;
dev_err(dev, "Version not recognized %x\n", version);
goto e_clk_off;
}
--
2.25.1
next reply other threads:[~2021-05-08 2:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-08 2:03 Zhen Lei [this message]
2021-05-11 10:56 ` [PATCH 1/1] mmc: usdhi6rol0: fix error return code in usdhi6_probe() Ulf Hansson
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=20210508020321.1677-1-thunder.leizhen@huawei.com \
--to=thunder.leizhen@huawei.com \
--cc=chris@printf.net \
--cc=g.liakhovetski@gmx.de \
--cc=jesper.nilsson@axis.com \
--cc=lars.persson@axis.com \
--cc=linux-arm-kernel@axis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).