From: Arend van Spriel Date: Mon, 22 Jul 2013 10:46:24 +0000 (+0200) Subject: brcmfmac: bail out of brcmf_txflowblock_if() for non-netdev interface X-Git-Tag: MMI-PSA29.97-13-9~13794^2~25^2^2~24 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=23d412a2e94f55b84dbf9d5e64f381677bc90575;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git brcmfmac: bail out of brcmf_txflowblock_if() for non-netdev interface 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 Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Arend van Spriel Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c index 8e8975562ec3..80099016d21f 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c @@ -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",