]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: exynos: Fix refcount leak in exynos_map_pmu
authorMiaoqian Lin <linmq006@gmail.com>
Mon, 23 May 2022 14:55:13 +0000 (18:55 +0400)
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 6 Jun 2022 08:40:57 +0000 (10:40 +0200)
commit0b9482e87194f742d42301c472b97ea69b7c6044
treebb84684858a3a93ef33676ce4e7d29ea136fda7a
parent54b03e5a94d4cba33a72aeaca1db7d19212fb393
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: d8e7cea6892e ("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>
arch/arm/mach-exynos/exynos.c