* [PATCH] wifi: brcmsmac: phy: Remove unreachable error handling code
@ 2026-01-31 17:23 Ingyu Jang
2026-02-01 9:37 ` Arend van Spriel
0 siblings, 1 reply; 2+ messages in thread
From: Ingyu Jang @ 2026-01-31 17:23 UTC (permalink / raw)
To: linux-wireless
Cc: arend.vanspriel, brcm80211, brcm80211-dev-list.pdl, Ingyu Jang
wlc_phy_txpwr_srom_read_lcnphy() in wlc_phy_attach_lcnphy() always
returns true, making the error handling code unreachable. Change the
function's return type to void and remove the dead code, similar to
the cleanup done for wlc_phy_txpwr_srom_read_nphy() in commit
47f0e32ffe4e ("wifi: brcmsmac: phy: Remove unreachable code").
Signed-off-by: Ingyu Jang <ingyujang25@korea.ac.kr>
---
.../wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c
index b4bba67a45ec3..5258681218ea9 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c
@@ -4790,7 +4790,7 @@ void wlc_phy_init_lcnphy(struct brcms_phy *pi)
wlc_lcnphy_calib_modes(pi, PHY_PERICAL_PHYINIT);
}
-static bool wlc_phy_txpwr_srom_read_lcnphy(struct brcms_phy *pi)
+static void wlc_phy_txpwr_srom_read_lcnphy(struct brcms_phy *pi)
{
s8 txpwr = 0;
int i;
@@ -4879,8 +4879,6 @@ static bool wlc_phy_txpwr_srom_read_lcnphy(struct brcms_phy *pi)
sprom->ant_available_bg);
}
pi_lcn->lcnphy_cck_dig_filt_type = -1;
-
- return true;
}
void wlc_2064_vco_cal(struct brcms_phy *pi)
@@ -4992,10 +4990,7 @@ bool wlc_phy_attach_lcnphy(struct brcms_phy *pi)
pi->pi_fptr.radioloftget = wlc_lcnphy_get_radio_loft;
pi->pi_fptr.detach = wlc_phy_detach_lcnphy;
- if (!wlc_phy_txpwr_srom_read_lcnphy(pi)) {
- kfree(pi->u.pi_lcnphy);
- return false;
- }
+ wlc_phy_txpwr_srom_read_lcnphy(pi);
if (LCNREV_IS(pi->pubpi.phy_rev, 1)) {
if (pi_lcn->lcnphy_tempsense_option == 3) {
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] wifi: brcmsmac: phy: Remove unreachable error handling code
2026-01-31 17:23 [PATCH] wifi: brcmsmac: phy: Remove unreachable error handling code Ingyu Jang
@ 2026-02-01 9:37 ` Arend van Spriel
0 siblings, 0 replies; 2+ messages in thread
From: Arend van Spriel @ 2026-02-01 9:37 UTC (permalink / raw)
To: Ingyu Jang, linux-wireless; +Cc: brcm80211, brcm80211-dev-list.pdl
On 31/01/2026 18:23, Ingyu Jang wrote:
> wlc_phy_txpwr_srom_read_lcnphy() in wlc_phy_attach_lcnphy() always
> returns true, making the error handling code unreachable. Change the
> function's return type to void and remove the dead code, similar to
> the cleanup done for wlc_phy_txpwr_srom_read_nphy() in commit
> 47f0e32ffe4e ("wifi: brcmsmac: phy: Remove unreachable code").
Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> Signed-off-by: Ingyu Jang <ingyujang25@korea.ac.kr>
> ---
> .../wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-01 9:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-31 17:23 [PATCH] wifi: brcmsmac: phy: Remove unreachable error handling code Ingyu Jang
2026-02-01 9:37 ` Arend van Spriel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox