Skip to contentSkip to conversation

mmc: core: Return err directly if mmc_wait_for_cmd() fails

PATCH New Yue Hu 1 participant 1 message May 20, 2021 MMC, SD and SDIO

lore
Share & tools
lore

Yue Hu

author
#0 lore raw

PATCH 1/1 mmc: core: Return err directly if mmc_wait_for_cmd() fails

From: Yue Hu <[email protected]>

We do not care the '*rocr' when mmc_send_op_cond() fails.

---
 drivers/mmc/core/mmc_ops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/core/mmc_ops.c +2 -2
index 5756781..b282998 100644
@@ -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;
 }
 
Signature · 1 line
1.9.1