aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2011-08-10 20:44:21 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-11 09:37:09 -0800
commit2b7940d84f184ad4b71cf66465bb55212d3b3fd8 (patch)
treeeb3914e63df8853e52c076dc331fc749aedb7afa /arch/powerpc/mm
parent656460cd7714653cf60a10c79e02cbfe2d9bf732 (diff)
downloadkernel_samsung_smdk4412-2b7940d84f184ad4b71cf66465bb55212d3b3fd8.tar.gz
kernel_samsung_smdk4412-2b7940d84f184ad4b71cf66465bb55212d3b3fd8.tar.bz2
kernel_samsung_smdk4412-2b7940d84f184ad4b71cf66465bb55212d3b3fd8.zip
powerpc/numa: Remove double of_node_put in hot_add_node_scn_to_nid
commit 6083184269fd723affca4f6340e491950267622a upstream. During memory hotplug testing, I got the following warning: ERROR: Bad of_node_put() on /memory@0 of_node_release kref_put of_node_put of_find_node_by_type hot_add_node_scn_to_nid hot_add_scn_to_nid memory_add_physaddr_to_nid ... of_find_node_by_type() loop does the of_node_put for us so we only need the handle the case where we terminate the loop early. As suggested by Stephen Rothwell we can do the of_node_put unconditionally outside of the loop since of_node_put handles a NULL argument fine. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r--arch/powerpc/mm/numa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 2164006fe17..2c1ae7a5fb5 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1214,11 +1214,12 @@ int hot_add_node_scn_to_nid(unsigned long scn_addr)
break;
}
- of_node_put(memory);
if (nid >= 0)
break;
}
+ of_node_put(memory);
+
return nid;
}