diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> | 2021-04-25 19:49:45 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-20 16:10:51 +0200 |
commit | 13c5fa0a43a0883d6d125847e797c390d4e6d439 (patch) | |
tree | 466510e0a6f88c06074626e9be1c80ba727f44c8 /arch | |
parent | dc3939d9723801594630075e959e8bf84de67f84 (diff) | |
download | linux-stable-13c5fa0a43a0883d6d125847e797c390d4e6d439.tar.gz linux-stable-13c5fa0a43a0883d6d125847e797c390d4e6d439.tar.bz2 linux-stable-13c5fa0a43a0883d6d125847e797c390d4e6d439.zip |
ARM: exynos: add missing of_node_put for loop iteration
[ Upstream commit 48d551bf20858240f38a0276be3016ff379918ac ]
Early exits from for_each_compatible_node() should decrement the
node reference counter. Reported by Coccinelle:
arch/arm/mach-exynos/exynos.c:52:1-25: WARNING:
Function "for_each_compatible_node" should have of_node_put() before break around line 58.
Fixes: b3205dea8fbf ("ARM: EXYNOS: Map SYSRAM through generic DT bindings")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210425174945.164612-1-krzysztof.kozlowski@canonical.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-exynos/exynos.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 9aa483366ebc..f226d4f57bf4 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -46,6 +46,7 @@ void __init exynos_sysram_init(void) sysram_base_addr = of_iomap(node, 0); sysram_base_phys = of_translate_address(node, of_get_address(node, 0, NULL, NULL)); + of_node_put(node); break; } @@ -53,6 +54,7 @@ void __init exynos_sysram_init(void) if (!of_device_is_available(node)) continue; sysram_ns_base_addr = of_iomap(node, 0); + of_node_put(node); break; } } |