From: Arend van Spriel Date: Mon, 6 Jan 2014 11:40:45 +0000 (+0100) Subject: brcmfmac: only disable clock when brcmf_sdio_bus_init() fails X-Git-Tag: v4.14-rc1~8188^2~3^2^2~73 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=76a4c6817c28dbc91fab8c366a177fa7215b2811;p=platform%2Fkernel%2Flinux-rpi.git brcmfmac: only disable clock when brcmf_sdio_bus_init() fails The condition to disable the clock at the end of brcmf_sdio_bus_init() was wrong as the bus state is updated by the calling function. Hence, the clock was always disabled after brcmf_sdio_bus_init() which was not the intended behaviour. Reviewed-by: Hante Meuleman Reviewed-by: Franky Lin Reviewed-by: Pieter-Paul Giesberts Signed-off-by: Arend van Spriel Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c index 124f5e8..2bf4757 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c @@ -3630,7 +3630,7 @@ static int brcmf_sdio_bus_init(struct device *dev) } /* If we didn't come up, turn off backplane clock */ - if (bus_if->state != BRCMF_BUS_DATA) + if (ret != 0) brcmf_sdio_clkctl(bus, CLK_NONE, false); exit: