Commit aad21d33 authored by Brian Norris's avatar Brian Norris Committed by Vamsi Singamsetty
Browse files

UPSTREAM: ath10k: snoc: fix unabalanced regulator error handling



If a regulator fails to set its voltage, we end up with an unbalanced
call to regulator_disable(), because the error path starts with the
current regulator (which was never enabled).

Factor out the "on" function to perform (and unwind if failed) a single
regulator at a time, and then main loop (ath10k_snoc_vreg_on()) can just
worry about unwinding the regulators that were already enabled.

It also helps to factor out the "off" function, to avoid repeating some
code here.

BUG=b:137525452
TEST=None

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>
Signed-off-by: default avatarGovind Singh <govinds@codeaurora.org>
(Cherry picked from commit 1a1a0d5c)
(Source: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git

)
Change-Id: Ib1158919ebabe3da14e24a76598116fb87bac2f8
Signed-off-by: default avatarVamsi Singamsetty <vamssi@codeaurora.org>
parent 09276ef1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment