]> git.baikalelectronics.ru Git - kernel.git/commit
clk: qcom: gdsc: add missing error handling
authorJohan Hovold <johan+linaro@kernel.org>
Thu, 29 Sep 2022 15:58:16 +0000 (17:58 +0200)
committerBjorn Andersson <andersson@kernel.org>
Thu, 29 Sep 2022 16:34:46 +0000 (11:34 -0500)
commit6cb708dc52f6950e6c5f12e7101803d67ff2ddb1
treec2503ae7f3c57dc5114f643333b10e59e7789510
parent4b190b24bdef00677de173658b777410f3a0f6b4
clk: qcom: gdsc: add missing error handling

Since commit d93c424362bb ("PM / Domains: Convert pm_genpd_init() to
return an error code") pm_genpd_init() can return an error which the
caller must handle.

The current error handling was also incomplete as the runtime PM and
regulator use counts were not balanced in all error paths.

Add the missing error handling to the GDSC initialisation to avoid
continuing as if nothing happened on errors.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220929155816.17425-1-johan+linaro@kernel.org
drivers/clk/qcom/gdsc.c