Commit 82e60d92 authored by Brian Norris's avatar Brian Norris Committed by Kalle Valo

ath10k: snoc: fix unbalanced clock error handling

Similar to regulator error handling, we should only start tearing down
the 'i - 1' clock when clock 'i' fails to enable. Otherwise, we might
end up with an unbalanced clock, where we never successfully enabled the
clock, but we try to disable it anyway.

Fixes: a6a793f9 ("ath10k: vote for hardware resources for WCN3990")
Signed-off-by: default avatarBrian Norris <briannorris@chromium.org>
Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent bfe57a6a
......@@ -1494,7 +1494,7 @@ static int ath10k_snoc_clk_init(struct ath10k *ar)
return 0;
err_clock_config:
for (; i >= 0; i--) {
for (i = i - 1; i >= 0; i--) {
clk_info = &ar_snoc->clk[i];
if (!clk_info->handle)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment