Skip to content

Commit 4c621d6

Browse files
krzkstorulf
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 <[email protected]> Reviewed-by: Heiko Stuebner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 391a2e6 commit 4c621d6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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)