<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <h5>This is an old version with a typo (pi->pubri  <span
      class="YPkS7KbdpWfGdYKd3QB9" data-src-align="10:6"
      style="white-space: pre-wrap;">instead pi->pubpi</span>).
      Please ignore it; the corrected v2 has been sent.</h5>
    <div class="moz-cite-prefix">29.07.2026 10:40, Dmitriy Okunev пишет:<br>
    </div>
    <blockquote type="cite"
      cite="mid:20260729074059.11128-1-dmitriy.okunev@red-soft.ru">
      <pre wrap="" class="moz-quote-pre">Pointer regs_2057_ptr may remain NULL if the device reports unsupported
phy/radio revisions. This could lead to NULL dereference. Add a check to prevent it.

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

Signed-off-by: Dmitriy Okunev <a class="moz-txt-link-rfc2396E" href="mailto:dmitriy.okunev@red-soft.ru"><dmitriy.okunev@red-soft.ru></a>
---
 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c
index 86cfa3e87a04..54a2a704e86c 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c
@@ -19760,7 +19760,10 @@ static void wlc_phy_radio_init_2057(struct brcms_phy *pi)
                }
        }
 
-       wlc_phy_init_radio_regs_allbands(pi, regs_2057_ptr);
+       if(regs_2057_ptr)
+               wlc_phy_init_radio_regs_allbands(pi, regs_2057_ptr);
+       else
+               pr_err("%s: Unsupported radio registers for phy rev %d, radio rev %d\n", __func__, pi->pubri.phy_rev, pi->pubri.radiorev);
 }
 
 static u16 wlc_phy_radio205x_rcal(struct brcms_phy *pi)

</pre>
    </blockquote>
  </body>
</html>