Commit 398539dd authored by Yangtao Li's avatar Yangtao Li Committed by Guo Ren

csky: Don't leak device tree node reference

of_find_node_by_type() acquires a reference to the node returned by it
and that reference needs to be dropped by its caller. setup_smp()
doesn't do that, so fix it by converting to for_each_of_cpu_node().
Signed-off-by: default avatarYangtao Li <tiny.windzz@gmail.com>
Signed-off-by: default avatarGuo Ren <guoren@kernel.org>
parent 7566ec39
......@@ -138,7 +138,7 @@ void __init setup_smp(void)
struct device_node *node = NULL;
int cpu;
while ((node = of_find_node_by_type(node, "cpu"))) {
for_each_of_cpu_node(node) {
if (!of_device_is_available(node))
continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment