Commit da64dae4 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Ulf Hansson

pmdomain: rockchip: Simplify locking with guard()

Simplify error handling (smaller error handling) over locks with
guard().
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240823-cleanup-h-guard-pm-domain-v1-2-8320722eaf39@linaro.orgSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 0d946ef4
......@@ -910,7 +910,7 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
* Prevent any rockchip_pmu_block() from racing with the remainder of
* setup (clocks, register initialization).
*/
mutex_lock(&dmc_pmu_mutex);
guard(mutex)(&dmc_pmu_mutex);
for_each_available_child_of_node_scoped(np, node) {
error = rockchip_pm_add_one_domain(pmu, node);
......@@ -943,13 +943,10 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
if (!WARN_ON_ONCE(dmc_pmu))
dmc_pmu = pmu;
mutex_unlock(&dmc_pmu_mutex);
return 0;
err_out:
rockchip_pm_domain_cleanup(pmu);
mutex_unlock(&dmc_pmu_mutex);
return error;
}
......
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