mirror of https://gitee.com/openkylin/linux.git
brcm80211: fmac: make sure cancel_work_sync only called after INIT_WORK
INIT_WORK only gets called after brcmf_proto_attach returns success. This dependency should be annotated in brcmf_detach to avoid any error. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Franky Lin <frankyl@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
2315992c2a
commit
89fdb468e2
|
@ -1109,13 +1109,13 @@ void brcmf_detach(struct device *dev)
|
||||||
if (drvr->iflist[i])
|
if (drvr->iflist[i])
|
||||||
brcmf_del_if(drvr, i);
|
brcmf_del_if(drvr, i);
|
||||||
|
|
||||||
cancel_work_sync(&drvr->setmacaddr_work);
|
|
||||||
cancel_work_sync(&drvr->multicast_work);
|
|
||||||
|
|
||||||
brcmf_bus_detach(drvr);
|
brcmf_bus_detach(drvr);
|
||||||
|
|
||||||
if (drvr->prot)
|
if (drvr->prot) {
|
||||||
|
cancel_work_sync(&drvr->setmacaddr_work);
|
||||||
|
cancel_work_sync(&drvr->multicast_work);
|
||||||
brcmf_proto_detach(drvr);
|
brcmf_proto_detach(drvr);
|
||||||
|
}
|
||||||
|
|
||||||
bus_if->drvr = NULL;
|
bus_if->drvr = NULL;
|
||||||
kfree(drvr);
|
kfree(drvr);
|
||||||
|
|
Loading…
Reference in New Issue