[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <d6037759-4dc8-4cc7-922f-95739761d068@web.de>
Date: Tue, 24 Sep 2024 21:33:49 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: linux-wireless@...r.kernel.org, Michael Büsch <m@...s.ch>
Cc: LKML <linux-kernel@...r.kernel.org>, kernel-janitors@...r.kernel.org
Subject: [PATCH] ssb: Call ssb_bus_may_powerdown(bus) only once in
ssb_bus_register()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Tue, 24 Sep 2024 21:24:13 +0200
A ssb_bus_may_powerdown(bus) call was immediately used after a return value
check for a ssb_fetch_invariants() call in this function implementation.
Thus call such a function 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/ssb/main.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index aa6165e3db4a..458858b5472e 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -663,11 +663,9 @@ ssb_bus_register(struct ssb_bus *bus,
ssb_extif_init(&bus->extif);
ssb_mipscore_init(&bus->mipscore);
err = ssb_fetch_invariants(bus, get_invariants);
- if (err) {
- ssb_bus_may_powerdown(bus);
- goto err_pcmcia_exit;
- }
ssb_bus_may_powerdown(bus);
+ if (err)
+ goto err_pcmcia_exit;
/* Queue it for attach.
* See the comment at the ssb_is_early_boot definition.
--
2.46.1
Powered by blists - more mailing lists