diff options
author | Julia Lawall <julia@diku.dk> | 2007-12-13 18:56:16 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-20 01:13:51 -0500 |
commit | 1fe58a875e4bb08125c657b1b91ac515d2bdbcbe (patch) | |
tree | af2c4d6aef0f1b7c46bc11dacb912dc932890ab8 | |
parent | af449c330eb39ae57b139832181d0dcf3b94d806 (diff) |
[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>
-rw-r--r-- | arch/powerpc/platforms/cell/cbe_regs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/cbe_regs.c b/arch/powerpc/platforms/cell/cbe_regs.c index a839c6cf3447..dbc338f187a2 100644 --- a/arch/powerpc/platforms/cell/cbe_regs.c +++ b/arch/powerpc/platforms/cell/cbe_regs.c | |||
@@ -256,6 +256,7 @@ void __init cbe_regs_init(void) | |||
256 | printk(KERN_ERR "cbe_regs: More BE chips than supported" | 256 | printk(KERN_ERR "cbe_regs: More BE chips than supported" |
257 | "!\n"); | 257 | "!\n"); |
258 | cbe_regs_map_count--; | 258 | cbe_regs_map_count--; |
259 | of_node_put(cpu); | ||
259 | return; | 260 | return; |
260 | } | 261 | } |
261 | map->cpu_node = cpu; | 262 | map->cpu_node = cpu; |