public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] brcm80211: brcmsmac: phy_cmn: Remove unreachable code
@ 2023-08-13 21:23 Artem Chernyshev
  2023-08-14  7:19 ` Jonas Gorski
  0 siblings, 1 reply; 6+ messages in thread
From: Artem Chernyshev @ 2023-08-13 21:23 UTC (permalink / raw)
  To: Franky Lin
  Cc: Artem Chernyshev, Hante Meuleman, Arend van Spriel, Kalle Valo,
	linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
	linux-kernel, lvc-project

Since wlc_phy_txpwr_srom_read_nphy() in wlc_phy_attach_nphy()
can not return false it's impossible to get true value in this
if statement

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru>
---
 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c
index ccc621b8ed9f..07f83ff5a54a 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c
@@ -551,8 +551,7 @@ wlc_phy_attach(struct shared_phy *sh, struct bcma_device *d11core,
 		if (!pi->phycal_timer)
 			goto err;
 
-		if (!wlc_phy_attach_nphy(pi))
-			goto err;
+		wlc_phy_attach_nphy(pi);
 
 	} else if (ISLCNPHY(pi)) {
 		if (!wlc_phy_attach_lcnphy(pi))
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-01-18 13:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-13 21:23 [PATCH] brcm80211: brcmsmac: phy_cmn: Remove unreachable code Artem Chernyshev
2023-08-14  7:19 ` Jonas Gorski
2023-08-14  7:24   ` Artem Chernyshev
2023-08-14  9:36   ` [PATCH v2] brcm80211: brcmsmac: phy: " Artem Chernyshev
2023-08-25  8:34     ` Jonas Gorski
2024-01-18 13:05     ` [v2] wifi: " Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox