diff options
author | Arend van Spriel <arend@broadcom.com> | 2012-02-09 21:09:04 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-22 14:48:51 -0500 |
commit | c0e89f084b5089acdfdda1cb45c88896fa0f5139 (patch) | |
tree | adca7714127380f7fc6ef401376f1a037d2f6d94 /drivers/net/wireless/brcm80211/brcmfmac | |
parent | f3d7cdc3b41804096a9df9c5d7a9439ef192f36a (diff) | |
download | blackbird-op-linux-c0e89f084b5089acdfdda1cb45c88896fa0f5139.tar.gz blackbird-op-linux-c0e89f084b5089acdfdda1cb45c88896fa0f5139.zip |
brcm80211: fmac: only return success in brcmf_sdbrcm_bus_init() when true
The function brcmf_sdbrcm_bus_init() always returned success except for
firmware download failure. However, also when enabling SDIO function 2
is failing the function should return failure. This patch fixes that.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@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')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c index b20029e9984c..47a192db36ff 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c @@ -3467,13 +3467,12 @@ static int brcmf_sdbrcm_bus_init(struct device *dev) /* Set bus state according to enable result */ bus_if->state = BRCMF_BUS_DATA; - } - - else { + } else { /* Disable F2 again */ enable = SDIO_FUNC_ENABLE_1; brcmf_sdcard_cfg_write(bus->sdiodev, SDIO_FUNC_0, SDIO_CCCR_IOEx, enable, NULL); + ret = -ENODEV; } /* Restore previous clock setting */ @@ -3481,7 +3480,7 @@ static int brcmf_sdbrcm_bus_init(struct device *dev) SBSDIO_FUNC1_CHIPCLKCSR, saveclk, &err); /* If we didn't come up, turn off backplane clock */ - if (bus_if->state != BRCMF_BUS_DATA) + if (!ret) brcmf_sdbrcm_clkctl(bus, CLK_NONE, false); exit: |