Skip to content

Commit c4c7952

Browse files
Yuuoniykrzk
authored andcommitted
ARM: exynos: Fix refcount leak in exynos_map_pmu
of_find_matching_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. of_node_put() checks null pointer. Fixes: fce9e5b ("ARM: EXYNOS: Add support for mapping PMU base address via DT") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Link: https://lore.kernel.org/r/20220523145513.12341-1-linmq006@gmail.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
1 parent f84d83d commit c4c7952

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/arm/mach-exynos/exynos.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ static void exynos_map_pmu(void)
149149
np = of_find_matching_node(NULL, exynos_dt_pmu_match);
150150
if (np)
151151
pmu_base_addr = of_iomap(np, 0);
152+
of_node_put(np);
152153
}
153154

154155
static void __init exynos_init_irq(void)

0 commit comments

Comments
 (0)