lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210520073846.1920-1-zbestahu@gmail.com>
Date:   Thu, 20 May 2021 15:38:46 +0800
From:   Yue Hu <zbestahu@...il.com>
To:     ulf.hansson@...aro.org
Cc:     linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
        huyue2@...ong.com, zbestahu@....com
Subject: [PATCH] mmc: core: Return err directly if mmc_wait_for_cmd() fails

From: Yue Hu <huyue2@...ong.com>

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

Signed-off-by: Yue Hu <huyue2@...ong.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ