Skip to content

Commit

Permalink
brcmfmac: bail out of brcmf_txflowblock_if() for non-netdev interface
Browse files Browse the repository at this point in the history
To avoid ending up in a NULL-pointer access, the function
brcmf_txflowblock_if() should only be called for interfaces
that have a netdev associated with it.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Arend van Spriel authored and John W. Linville committed Jul 22, 2013
1 parent 28a905b commit 23d412a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ void brcmf_txflowblock_if(struct brcmf_if *ifp,
{
unsigned long flags;

if (!ifp)
if (!ifp || !ifp->ndev)
return;

brcmf_dbg(TRACE, "enter: idx=%d stop=0x%X reason=%d state=%d\n",
Expand Down

0 comments on commit 23d412a

Please sign in to comment.