brcmfmac: call brcmf_detach() unconditional in sdio .remove() callback

The function brcmf_detach() checks whether it needs to do his stuff
or can return immediately. No need to have the same check in the
calling code.

Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
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>
This commit is contained in:
Arend van Spriel 2014-05-27 12:56:18 +02:00 committed by John W. Linville
parent dabedab983
commit 4faf28b7b4
1 changed files with 1 additions and 3 deletions

View File

@ -4176,9 +4176,7 @@ void brcmf_sdio_remove(struct brcmf_sdio *bus)
/* De-register interrupt handler */ /* De-register interrupt handler */
brcmf_sdiod_intr_unregister(bus->sdiodev); brcmf_sdiod_intr_unregister(bus->sdiodev);
if (bus->sdiodev->bus_if->drvr) { brcmf_detach(bus->sdiodev->dev);
brcmf_detach(bus->sdiodev->dev);
}
cancel_work_sync(&bus->datawork); cancel_work_sync(&bus->datawork);
if (bus->brcmf_wq) if (bus->brcmf_wq)