Skip to content

Commit 4c621d6

Browse files
krzkUlf Hansson
authored andcommitted
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>
1 parent 391a2e6 commit 4c621d6

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/pmdomain/rockchip/pm-domains.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,12 +716,11 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
716716
goto err_unprepare_clocks;
717717
}
718718
pd->qos_regmap[j] = syscon_node_to_regmap(qos_node);
719+
of_node_put(qos_node);
719720
if (IS_ERR(pd->qos_regmap[j])) {
720721
error = -ENODEV;
721-
of_node_put(qos_node);
722722
goto err_unprepare_clocks;
723723
}
724-
of_node_put(qos_node);
725724
}
726725
}
727726

0 commit comments

Comments
 (0)