* [PATCH] powerpc/xics: add missing of_node_put() in error path
@ 2018-04-25 11:27 YueHaibing
2018-06-04 14:10 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2018-04-25 11:27 UTC (permalink / raw)
To: benh, paulus, mpe, geoff, joe; +Cc: linuxppc-dev, linux-kernel, YueHaibing
The device node obtained with of_find_compatible_node() should be
released by calling of_node_put(). But it was not released when
of_get_property() failed.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
arch/powerpc/sysdev/xics/xics-common.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/xics/xics-common.c
index 77e864d..e54a9e6 100644
--- a/arch/powerpc/sysdev/xics/xics-common.c
+++ b/arch/powerpc/sysdev/xics/xics-common.c
@@ -448,7 +448,10 @@ static void __init xics_get_server_size(void)
return;
isize = of_get_property(np, "ibm,interrupt-server#-size", NULL);
if (!isize)
+ {
+ of_node_put(np);
return;
+ }
xics_interrupt_server_size = be32_to_cpu(*isize);
of_node_put(np);
}
--
2.7.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: powerpc/xics: add missing of_node_put() in error path
2018-04-25 11:27 [PATCH] powerpc/xics: add missing of_node_put() in error path YueHaibing
@ 2018-06-04 14:10 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2018-06-04 14:10 UTC (permalink / raw)
To: YueHaibing, benh, paulus, geoff, joe
Cc: YueHaibing, linuxppc-dev, linux-kernel
On Wed, 2018-04-25 at 11:27:07 UTC, YueHaibing wrote:
> The device node obtained with of_find_compatible_node() should be
> released by calling of_node_put(). But it was not released when
> of_get_property() failed.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/589b1f7e4b0db4c31cef3b55f75148
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-04 14:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-25 11:27 [PATCH] powerpc/xics: add missing of_node_put() in error path YueHaibing
2018-06-04 14:10 ` 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).