summaryrefslogtreecommitdiffstats
path: root/drivers/pmdomain
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2024-08-25 20:31:16 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2024-09-13 12:52:13 +0200
commit4c621d6e667af6a41a0434fed6774abec7857801 (patch)
tree3cc4506bdf99159b6b20cc76481abe805d7827f4 /drivers/pmdomain
parentpmdomain: mediatek: make use of dev_err_cast_probe() (diff)
downloadlinux-4c621d6e667af6a41a0434fed6774abec7857801.tar.xz
linux-4c621d6e667af6a41a0434fed6774abec7857801.zip
pmdomain: rockchip: Simplify dropping OF node reference
Drop OF node reference immediately after using it in syscon_node_to_regmap(), which is both simpler and typical/expected code pattern. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Link: https://lore.kernel.org/r/20240825183116.102953-1-krzysztof.kozlowski@linaro.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/pmdomain')
-rw-r--r--drivers/pmdomain/rockchip/pm-domains.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pmdomain/rockchip/pm-domains.c b/drivers/pmdomain/rockchip/pm-domains.c
index 538dde58d924..66e473065b6b 100644
--- a/drivers/pmdomain/rockchip/pm-domains.c
+++ b/drivers/pmdomain/rockchip/pm-domains.c
@@ -716,12 +716,11 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
goto err_unprepare_clocks;
}
pd->qos_regmap[j] = syscon_node_to_regmap(qos_node);
+ of_node_put(qos_node);
if (IS_ERR(pd->qos_regmap[j])) {
error = -ENODEV;
- of_node_put(qos_node);
goto err_unprepare_clocks;
}
- of_node_put(qos_node);
}
}