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>] [thread-next>] [day] [month] [year] [list]
Message-ID: <847bf395-6d62-49c9-a39d-8e82c5b17bf7@sabinyo.mountain>
Date: Tue, 15 Jul 2025 18:00:58 -0500
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Binbin Zhou <zhoubinbin@...ngson.cn>
Cc: Ulf Hansson <ulf.hansson@...aro.org>,
	Huacai Chen <chenhuacai@...nel.org>, linux-mmc@...r.kernel.org,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH next] mmc: loongson2: Fix error code in
 loongson2_mmc_resource_request()

There is a cut and paste bug so we accidentally return the wrong
variable.  It should be "ret" instead of PTR_ERR(host->clk).

Fixes: 2115772014bd ("mmc: loongson2: Add Loongson-2K SD/SDIO controller driver")
Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
---
 drivers/mmc/host/loongson2-mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/loongson2-mmc.c b/drivers/mmc/host/loongson2-mmc.c
index ba6bb8fd5535..63d01d2cd978 100644
--- a/drivers/mmc/host/loongson2-mmc.c
+++ b/drivers/mmc/host/loongson2-mmc.c
@@ -887,7 +887,7 @@ static int loongson2_mmc_resource_request(struct platform_device *pdev,
 	if (host->clk) {
 		ret = devm_clk_rate_exclusive_get(dev, host->clk);
 		if (ret)
-			return PTR_ERR(host->clk);
+			return ret;
 
 		host->current_clk = clk_get_rate(host->clk);
 	} else {
-- 
2.47.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ