Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1fe58a875e4bb08125c657b1b91ac515d2bdbcbe
Commit:     1fe58a875e4bb08125c657b1b91ac515d2bdbcbe
Parent:     af449c330eb39ae57b139832181d0dcf3b94d806
Author:     Julia Lawall <[EMAIL PROTECTED]>
AuthorDate: Thu Dec 13 15:56:16 2007 -0800
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Thu Dec 20 17:13:51 2007 +1100

    [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 <[EMAIL PROTECTED]>
    Cc: Christian Krafft <[EMAIL PROTECTED]>
    Cc: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Cc: David Erb <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 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 a839c6c..dbc338f 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)
                        printk(KERN_ERR "cbe_regs: More BE chips than supported"
                               "!\n");
                        cbe_regs_map_count--;
+                       of_node_put(cpu);
                        return;
                }
                map->cpu_node = cpu;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to