mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 08:31:55 +00:00
brcmfmac: fix potential NULL pointer dereference in brcmf_fws_flow_control_check()
The dereference to 'ifp' in debug code should be moved below the NULL test. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
4fc4118cdb
commit
16a1f73670
@ -834,11 +834,12 @@ brcmf_fws_flow_control_check(struct brcmf_fws_info *fws, struct pktq *pq,
|
||||
{
|
||||
struct brcmf_if *ifp = fws->drvr->iflist[if_id];
|
||||
|
||||
brcmf_dbg(TRACE,
|
||||
"enter: bssidx=%d, ifidx=%d\n", ifp->bssidx, ifp->ifidx);
|
||||
if (WARN_ON(!ifp))
|
||||
return;
|
||||
|
||||
brcmf_dbg(TRACE,
|
||||
"enter: bssidx=%d, ifidx=%d\n", ifp->bssidx, ifp->ifidx);
|
||||
|
||||
if ((ifp->netif_stop & BRCMF_NETIF_STOP_REASON_FWS_FC) &&
|
||||
pq->len <= BRCMF_FWS_FLOWCONTROL_LOWATER)
|
||||
brcmf_txflowblock_if(ifp,
|
||||
|
Loading…
Reference in New Issue
Block a user