[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <33b08664-fa25-4cef-86b2-49f65b4369c9@web.de>
Date: Sat, 21 Sep 2024 14:06:07 +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 3/3] ath6kl: Reduce scopes for two variables in
ath6kl_sdio_power_on()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 21 Sep 2024 13:30:48 +0200
Adjust the definitions for the local variables "func" and "ret"
so that the corresponding setting will be performed a bit later.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/net/wireless/ath/ath6kl/sdio.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c
index e4d15cc9b36c..689f83f6bce5 100644
--- a/drivers/net/wireless/ath/ath6kl/sdio.c
+++ b/drivers/net/wireless/ath/ath6kl/sdio.c
@@ -503,17 +503,15 @@ static void ath6kl_sdio_irq_handler(struct sdio_func *func)
static int ath6kl_sdio_power_on(struct ath6kl *ar)
{
struct ath6kl_sdio *ar_sdio = ath6kl_sdio_priv(ar);
- struct sdio_func *func = ar_sdio->func;
- int ret = 0;
if (!ar_sdio->is_disabled)
return 0;
ath6kl_dbg(ATH6KL_DBG_BOOT, "sdio power on\n");
-
+ struct sdio_func *func = ar_sdio->func;
sdio_claim_host(func);
- ret = sdio_enable_func(func);
+ int ret = sdio_enable_func(func);
sdio_release_host(func);
if (ret) {
ath6kl_err("Unable to enable sdio func: %d)\n", ret);
--
2.46.0
Powered by blists - more mailing lists