diff options
author | Brian Norris <briannorris@chromium.org> | 2018-11-05 13:35:22 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-11-06 17:17:16 +0100 |
commit | 82e60d920e8ad70cd9a280ab156566755f1fe4aa (patch) | |
tree | 81d97be3a7589ccd2ff5752058f97bd6a20017c6 /drivers/net/wireless/ath/ath10k/snoc.c | |
parent | ath10k: snoc: relax voltage requirements (diff) | |
download | linux-82e60d920e8ad70cd9a280ab156566755f1fe4aa.tar.xz linux-82e60d920e8ad70cd9a280ab156566755f1fe4aa.zip |
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: a6a793f98786 ("ath10k: vote for hardware resources for WCN3990")
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c index 48292ed7d494..81b86a787c34 100644 --- a/drivers/net/wireless/ath/ath10k/snoc.c +++ b/drivers/net/wireless/ath/ath10k/snoc.c @@ -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) |