Skip to content

Commit 1fe58a8

Browse files
Julia Lawallpaulusmack
authored andcommitted
[POWERPC] cell/cbe_regs.c: 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. This was detected and fixed using the following semantic patch. (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ identifier d; type T; expression e; iterator for_each_node_by_type; @@ T *d; ... for_each_node_by_type(d,...) {... when != of_node_put(d) when != e = d ( return d; | + of_node_put(d); ? return ...; ) ...} // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Cc: Christian Krafft <krafft@de.ibm.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: David Erb <djerb@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
1 parent af449c3 commit 1fe58a8

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎arch/powerpc/platforms/cell/cbe_regs.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ void __init cbe_regs_init(void)
256256
printk(KERN_ERR "cbe_regs: More BE chips than supported"
257257
"!\n");
258258
cbe_regs_map_count--;
259+
of_node_put(cpu);
259260
return;
260261
}
261262
map->cpu_node = cpu;

0 commit comments

Comments
 (0)