Skip to content

Commit

Permalink
ath10k: Fix qmi init error handling
Browse files Browse the repository at this point in the history
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: ba94c75 ("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>
  • Loading branch information
Jeffrey Hugo authored and Kalle Valo committed Nov 25, 2019
1 parent 23b5156 commit f8a595a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/wireless/ath/ath10k/snoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit f8a595a

Please sign in to comment.