* [PATCH] powerpc/powermac: fix OF node refcount leak
@ 2017-01-31 17:43 Dmitry Torokhov
2017-12-12 11:39 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Torokhov @ 2017-01-31 17:43 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: Paul Mackerras, Michael Ellerman, linuxppc-dev, linux-kernel
We need to call of_node_put() for device nodes obtained with
of_find_node_by_name().
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
Found by visual inspection, not tested...
arch/powerpc/platforms/powermac/pic.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index f5f9ad7c3398..d3a9ab0dbcb1 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -604,6 +604,7 @@ static int pmacpic_find_viaint(void)
if (np == NULL)
goto not_found;
viaint = irq_of_parse_and_map(np, 0);
+ of_node_put(np);
not_found:
#endif /* CONFIG_ADB_PMU */
--
2.11.0.483.g087da7b7c-goog
--
Dmitry
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: powerpc/powermac: fix OF node refcount leak
2017-01-31 17:43 [PATCH] powerpc/powermac: fix OF node refcount leak Dmitry Torokhov
@ 2017-12-12 11:39 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2017-12-12 11:39 UTC (permalink / raw)
To: Dmitry Torokhov, Benjamin Herrenschmidt
Cc: Paul Mackerras, linuxppc-dev, linux-kernel
On Tue, 2017-01-31 at 17:43:55 UTC, Dmitry Torokhov wrote:
> We need to call of_node_put() for device nodes obtained with
> of_find_node_by_name().
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/2aaf0a198d7af53a946ad69976d3cc
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-12 11:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-31 17:43 [PATCH] powerpc/powermac: fix OF node refcount leak Dmitry Torokhov
2017-12-12 11:39 ` Michael Ellerman
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).