From: Michal Kazior Date: Fri, 16 May 2014 14:15:39 +0000 (+0300) Subject: ath10k: prevent hif_stop being called twice X-Git-Tag: v3.16~18^2~11^2~7^2~3^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f2708bedf2bec33cab077defe0587497e203284d;p=platform%2Fkernel%2Flinux-exynos.git ath10k: prevent hif_stop being called twice Recently there was a bug discovered that involved hif_stop() being called twice that ended up with a double free_irq() call but it only manifested with multiple MSI interrupts mapping. Catch this kind of a problem early in driver regardless of interrupt mapping. Signed-off-by: Michal Kazior Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 7d72b9c..91d6076 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -1272,6 +1272,9 @@ static void ath10k_pci_hif_stop(struct ath10k *ar) ath10k_dbg(ATH10K_DBG_BOOT, "boot hif stop\n"); + if (WARN_ON(!ar_pci->started)) + return; + ret = ath10k_ce_disable_interrupts(ar); if (ret) ath10k_warn("failed to disable CE interrupts: %d\n", ret);