* [PATCH] ARM: exynos: add missing of_node_put for loop iteration
@ 2021-04-25 17:49 Krzysztof Kozlowski
2021-04-25 18:43 ` Arnd Bergmann
2021-05-11 12:37 ` Krzysztof Kozlowski
0 siblings, 2 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2021-04-25 17:49 UTC (permalink / raw)
To: Krzysztof Kozlowski, Arnd Bergmann, linux-arm-kernel,
linux-samsung-soc, linux-kernel
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>
---
arch/arm/mach-exynos/exynos.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index 25b01da4771b..8b48326be9fd 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -55,6 +55,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;
}
@@ -62,6 +63,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;
}
}
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM: exynos: add missing of_node_put for loop iteration
2021-04-25 17:49 [PATCH] ARM: exynos: add missing of_node_put for loop iteration Krzysztof Kozlowski
@ 2021-04-25 18:43 ` Arnd Bergmann
2021-05-11 12:37 ` Krzysztof Kozlowski
1 sibling, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2021-04-25 18:43 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Linux ARM, moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES,
Linux Kernel Mailing List
On Sun, Apr 25, 2021 at 7:50 PM Krzysztof Kozlowski
<krzysztof.kozlowski@canonical.com> wrote:
>
> 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>
I've already tagged the pull requests for 5.13, so I guess you can
just add this into
your next fixes branch.
Arnd
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM: exynos: add missing of_node_put for loop iteration
2021-04-25 17:49 [PATCH] ARM: exynos: add missing of_node_put for loop iteration Krzysztof Kozlowski
2021-04-25 18:43 ` Arnd Bergmann
@ 2021-05-11 12:37 ` Krzysztof Kozlowski
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2021-05-11 12:37 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-arm-kernel, linux-samsung-soc,
linux-kernel, Arnd Bergmann
On Sun, 25 Apr 2021 19:49:45 +0200, Krzysztof Kozlowski wrote:
> 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.
Applied, thanks!
[1/1] ARM: exynos: add missing of_node_put for loop iteration
commit: 48d551bf20858240f38a0276be3016ff379918ac
Best regards,
--
Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-11 13:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-25 17:49 [PATCH] ARM: exynos: add missing of_node_put for loop iteration Krzysztof Kozlowski
2021-04-25 18:43 ` Arnd Bergmann
2021-05-11 12:37 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).