Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -138,7 +138,7 @@ void __init setup_smp(void)
	struct device_node *node = NULL;
	struct device_node *node = NULL;
	int cpu;
	int cpu;


	while ((node = of_find_node_by_type(node, "cpu"))) {
	for_each_of_cpu_node(node) {
		if (!of_device_is_available(node))
		if (!of_device_is_available(node))
			continue;
			continue;