OSDN Git Service

brcmfmac: unbind all devices upon failure in firmware callback
authorArend Van Spriel <arend.vanspriel@broadcom.com>
Mon, 12 Jun 2017 11:47:34 +0000 (12:47 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 15 Jun 2017 16:06:53 +0000 (19:06 +0300)
commit7a51461fc2da82a6c565a3ee65c41c197f28225d
treec40c8a7d19b4196c6583cee08af04c1adc5adc8e
parent03fb0e8393fae8ebb6710a99387853ed0becbc8e
brcmfmac: unbind all devices upon failure in firmware callback

When request firmware fails, brcmf_ops_sdio_remove is being called and
brcmf_bus freed. In such circumstancies if you do a suspend/resume cycle
the kernel hangs on resume due a NULL pointer dereference in resume
function. So in brcmf_sdio_firmware_callback() we need to unbind the
driver from both sdio_func devices when firmware load failure is indicated.

Cc: stable@vger.kernel.org # 4.9.x-
Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c