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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5437e685-8fb5-45f4-a78e-9aa961f5adf7@web.de>
Date: Sat, 21 Sep 2024 14:02:29 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: linux-wireless@...r.kernel.org, James Minor <james.minor@...com>,
 Kalle Valo <kvalo@...nel.org>,
 Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
 Steve deRosier <steve.derosier@...rdtech.com>,
 Julia Lawall <julia.lawall@...ia.fr>
Subject: [PATCH 1/3] ath6kl: Use sdio_release_host(func) call only once in
 ath6kl_sdio_power_on()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 21 Sep 2024 12:00:19 +0200

A sdio_release_host(func) call was immediately used after a return code
check for a sdio_enable_func() call in this function implementation.
Thus use such a function call only once instead directly before the check.

This issue was transformed by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 drivers/net/wireless/ath/ath6kl/sdio.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c
index 9ab091044706..5106c6909dc8 100644
--- a/drivers/net/wireless/ath/ath6kl/sdio.c
+++ b/drivers/net/wireless/ath/ath6kl/sdio.c
@@ -514,14 +514,12 @@ static int ath6kl_sdio_power_on(struct ath6kl *ar)
 	sdio_claim_host(func);

 	ret = sdio_enable_func(func);
+	sdio_release_host(func);
 	if (ret) {
 		ath6kl_err("Unable to enable sdio func: %d)\n", ret);
-		sdio_release_host(func);
 		return ret;
 	}

-	sdio_release_host(func);
-
 	/*
 	 * Wait for hardware to initialise. It should take a lot less than
 	 * 10 ms but let's be conservative here.
--
2.46.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ