aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/snoc.c
diff options
context:
space:
mode:
authorJeffrey Hugo <jeffrey.l.hugo@gmail.com>2019-11-13 07:40:16 -0800
committerKalle Valo <kvalo@codeaurora.org>2019-11-25 14:02:17 +0200
commitf8a595a87e93a33a10879f4b856be818d2f53c84 (patch)
treee68b8ce17b41281dd216e51e4ec14062237ad681 /drivers/net/wireless/ath/ath10k/snoc.c
parentath10k: add NL80211_FEATURE_ND_RANDOM_MAC_ADDR for NLO (diff)
downloadlinux-dev-f8a595a87e93a33a10879f4b856be818d2f53c84.tar.xz
linux-dev-f8a595a87e93a33a10879f4b856be818d2f53c84.zip
ath10k: Fix qmi init error handling
When ath10k_qmi_init() fails, the error handling does not free the irq resources, which causes an issue if we EPROBE_DEFER as we'll attempt to (re-)register irqs which are already registered. Fix this by doing a power off since we just powered on the hardware, and freeing the irqs as error handling. Fixes: ba94c753ccb4 ("ath10k: add QMI message handshake for wcn3990 client") Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/snoc.c')
-rw-r--r--drivers/net/wireless/ath/ath10k/snoc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
index 16177497bba7..7e85c4916e7f 100644
--- a/drivers/net/wireless/ath/ath10k/snoc.c
+++ b/drivers/net/wireless/ath/ath10k/snoc.c
@@ -1563,13 +1563,16 @@ static int ath10k_snoc_probe(struct platform_device *pdev)
ret = ath10k_qmi_init(ar, msa_size);
if (ret) {
ath10k_warn(ar, "failed to register wlfw qmi client: %d\n", ret);
- goto err_core_destroy;
+ goto err_power_off;
}
ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc probe\n");
return 0;
+err_power_off:
+ ath10k_hw_power_off(ar);
+
err_free_irq:
ath10k_snoc_free_irq(ar);