From: Yue Hu <zbestahu@gmail.com>
To: ulf.hansson@linaro.org
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
huyue2@yulong.com, zbestahu@163.com
Subject: [PATCH] mmc: core: Return err directly if mmc_wait_for_cmd() fails
Date: Thu, 20 May 2021 15:38:46 +0800 [thread overview]
Message-ID: <20210520073846.1920-1-zbestahu@gmail.com> (raw)
From: Yue Hu <huyue2@yulong.com>
We do not care the '*rocr' when mmc_send_op_cond() fails.
Signed-off-by: Yue Hu <huyue2@yulong.com>
---
drivers/mmc/core/mmc_ops.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
index 5756781..b282998 100644
--- a/drivers/mmc/core/mmc_ops.c
+++ b/drivers/mmc/core/mmc_ops.c
@@ -180,7 +180,7 @@ int mmc_send_op_cond(struct mmc_host *host, u32 ocr, u32 *rocr)
for (i = 100; i; i--) {
err = mmc_wait_for_cmd(host, &cmd, 0);
if (err)
- break;
+ goto out;
/* wait until reset completes */
if (mmc_host_is_spi(host)) {
@@ -208,7 +208,7 @@ int mmc_send_op_cond(struct mmc_host *host, u32 ocr, u32 *rocr)
if (rocr && !mmc_host_is_spi(host))
*rocr = cmd.resp[0];
-
+out:
return err;
}
--
1.9.1
reply other threads:[~2021-05-20 7:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210520073846.1920-1-zbestahu@gmail.com \
--to=zbestahu@gmail.com \
--cc=huyue2@yulong.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=zbestahu@163.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