]> 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)
commit4e7ca813662d360939f1dfd93a47a8054badb992
treec2503ae7f3c57dc5114f643333b10e59e7789510
parent416d13d4992a94291d7bff774cea30cf20cf7170
clk: qcom: gdsc: add missing error handling

Since commit 8fa337f36839 ("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