mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
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: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Guo Ren <guoren@kernel.org>
This commit is contained in:
parent
7566ec393f
commit
398539dd69
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user