* [PATCH -next] powerpc/powernv: add missing of_node_put() in opal_export_attrs()
@ 2022-09-06 14:17 Zheng Yongjun
2022-09-23 11:13 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Zheng Yongjun @ 2022-09-06 14:17 UTC (permalink / raw)
To: linuxppc-dev, linux-kernel; +Cc: npiggin
After using 'np' returned by of_find_node_by_path(), of_node_put()
need be called to decrease the refcount.
Fixes: 11fe909d2362 ("powerpc/powernv: Add OPAL exports attributes to sysfs")
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
arch/powerpc/platforms/powernv/opal.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index 55a8fbfdb5b2..3510b55b36f8 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -892,6 +892,7 @@ static void opal_export_attrs(void)
kobj = kobject_create_and_add("exports", opal_kobj);
if (!kobj) {
pr_warn("kobject_create_and_add() of exports failed\n");
+ of_node_put(np);
return;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] powerpc/powernv: add missing of_node_put() in opal_export_attrs()
2022-09-06 14:17 [PATCH -next] powerpc/powernv: add missing of_node_put() in opal_export_attrs() Zheng Yongjun
@ 2022-09-23 11:13 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2022-09-23 11:13 UTC (permalink / raw)
To: linux-kernel, linuxppc-dev, Zheng Yongjun; +Cc: npiggin
On Tue, 6 Sep 2022 14:17:03 +0000, Zheng Yongjun wrote:
> After using 'np' returned by of_find_node_by_path(), of_node_put()
> need be called to decrease the refcount.
>
>
Applied to powerpc/next.
[1/1] powerpc/powernv: add missing of_node_put() in opal_export_attrs()
https://git.kernel.org/powerpc/c/71a92e99c47900cc164620948b3863382cec4f1a
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-23 11:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-06 14:17 [PATCH -next] powerpc/powernv: add missing of_node_put() in opal_export_attrs() Zheng Yongjun
2022-09-23 11:13 ` 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).