mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 16:37:50 +00:00
[SPARC]: Add missing of_node_put
There should be an of_node_put when breaking out of a loop that iterates using for_each_node_by_type. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
75c6d1410c
commit
b127aa8baf
1 changed files with 3 additions and 1 deletions
|
@ -62,8 +62,10 @@ static int __cpu_find_by(int (*compare)(int, int, void *), void *compare_arg,
|
||||||
int err = check_cpu_node(dp->node, &cur_inst,
|
int err = check_cpu_node(dp->node, &cur_inst,
|
||||||
compare, compare_arg,
|
compare, compare_arg,
|
||||||
prom_node, mid);
|
prom_node, mid);
|
||||||
if (!err)
|
if (!err) {
|
||||||
|
of_node_put(dp);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
Loading…
Reference in a new issue