summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
diff options
context:
space:
mode:
authorHante Meuleman <meuleman@broadcom.com>2013-02-08 12:06:32 +0100
committerJohn W. Linville <linville@tuxdriver.com>2013-02-08 14:51:36 -0500
commit643ecaab355c3879215cb34c10ae88d729e408be (patch)
treeb51f3fb0ad1f993cae5f404a40901660114ff2b0 /drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
parent2880b86859967af710c72f7d34fb421a86a71e22 (diff)
brcmfmac: Check null pointer on brcmf_dev_reset.
When unloading it is possible that drvr is not null, but iflist[0] is. So check iflist[0] pointer before using it. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
index db03d30f60b7..f90db576e90b 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
@@ -842,7 +842,8 @@ void brcmf_dev_reset(struct device *dev)
if (drvr == NULL)
return;
- brcmf_fil_cmd_int_set(drvr->iflist[0], BRCMF_C_TERMINATED, 1);
+ if (drvr->iflist[0])
+ brcmf_fil_cmd_int_set(drvr->iflist[0], BRCMF_C_TERMINATED, 1);
}
void brcmf_detach(struct device *dev)