From: Julia Lawall Date: Tue, 4 Dec 2007 08:33:07 +0000 (-0800) Subject: [SPARC]: Add missing of_node_put X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b127aa8bafb3b5b555ab0e7d6f87cb8a541a3d46;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [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 Signed-off-by: David S. Miller --- diff --git a/arch/sparc/kernel/devices.c b/arch/sparc/kernel/devices.c index af90a5f9ab57..b240b8863fd0 100644 --- a/arch/sparc/kernel/devices.c +++ b/arch/sparc/kernel/devices.c @@ -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, compare, compare_arg, prom_node, mid); - if (!err) + if (!err) { + of_node_put(dp); return 0; + } } return -ENODEV;