powerpc/pseries: Add mising of_node_put in delete_dt_node

The node to be detached is retrieved via its phandle by a call to
of_find_node_by_phandle which increments the ref count. We need a matching
call to of_node_put to decrement the ref count and ensure the node is
actually freed.

Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Acked-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Tyrel Datwyler 2013-08-14 22:23:51 -07:00 committed by Benjamin Herrenschmidt
parent 8d5ff32076
commit 14cd820a2a
1 changed files with 1 additions and 0 deletions

View File

@ -62,6 +62,7 @@ static int delete_dt_node(u32 phandle)
return -ENOENT; return -ENOENT;
dlpar_detach_node(dn); dlpar_detach_node(dn);
of_node_put(dn);
return 0; return 0;
} }