All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: core: Return err directly if mmc_wait_for_cmd() fails
@ 2021-05-20  7:38 Yue Hu
  0 siblings, 0 replies; only message in thread
From: Yue Hu @ 2021-05-20  7:38 UTC (permalink / raw)
  To: ulf.hansson; +Cc: linux-mmc, linux-kernel, huyue2, zbestahu

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-20  7:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20  7:38 [PATCH] mmc: core: Return err directly if mmc_wait_for_cmd() fails Yue Hu

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.