path: root/drivers/of/dynamic.c
diff options
authorFrank Rowand <frank.rowand@sony.com>2018-10-04 20:26:05 -0700
committerFrank Rowand <frank.rowand@sony.com>2018-11-08 22:10:53 -0800
commit5b2c2f5a0ea3a43e0dee78059e34c7cb54136dcc (patch)
tree8d1e20deb84d02045599fc0e717a42bfd2a98262 /drivers/of/dynamic.c
parent7c528e457d53c75107d5aa56892316d265c778de (diff)
of: overlay: add missing of_node_get() in __of_attach_node_sysfs
There is a matching of_node_put() in __of_detach_node_sysfs() Remove misleading comment from function header comment for of_detach_node(). This patch may result in memory leaks from code that directly calls the dynamic node add and delete functions directly instead of using changesets. This commit should result in powerpc systems that dynamically allocate a node, then later deallocate the node to have a memory leak when the node is deallocated. The next commit will fix the leak. Tested-by: Alan Tull <atull@kernel.org> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Diffstat (limited to 'drivers/of/dynamic.c')
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c
index 12c3f9a15e94..146681540487 100644
--- a/drivers/of/dynamic.c
+++ b/drivers/of/dynamic.c
@@ -272,9 +272,6 @@ void __of_detach_node(struct device_node *np)
* of_detach_node() - "Unplug" a node from the device tree.
- *
- * The caller must hold a reference to the node. The memory associated with
- * the node is not freed until its refcount goes to zero.
int of_detach_node(struct device_node *np)