diff options
Diffstat (limited to 'drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c')
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 629140b6d7e2..264ad63232f8 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -4247,17 +4247,26 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, sdiod->bus_if->chip = bus->ci->chip; sdiod->bus_if->chiprev = bus->ci->chiprev; + err = brcmf_alloc(sdiod->dev, sdiod->settings); + if (err) { + brcmf_err("brcmf_alloc failed\n"); + goto claim; + } + /* Attach to the common layer, reserve hdr space */ - err = brcmf_attach(sdiod->dev, sdiod->settings); + err = brcmf_attach(sdiod->dev); if (err != 0) { brcmf_err("brcmf_attach failed\n"); - sdio_claim_host(sdiod->func1); - goto checkdied; + goto free; } /* ready */ return; +free: + brcmf_free(sdiod->dev); +claim: + sdio_claim_host(sdiod->func1); checkdied: brcmf_sdio_checkdied(bus); release: |