mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
2880b86859
commit
643ecaab35
drivers/net/wireless/brcm80211/brcmfmac
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue