[PATCH] brcm80211: brcmsmac: phy_cmn: Remove unreachable code

From: Artem Chernyshev
Date: Sun Aug 13 2023 - 17:23:55 EST


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@xxxxxxxxxxx>
---
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