Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=76832d8416430d6dd0575579ca1e00d1a790f4cb
Commit:     76832d8416430d6dd0575579ca1e00d1a790f4cb
Parent:     72fad7139b6829f71d7f41f39eb30da5760d90a8
Author:     Julia Lawall <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 10 15:49:28 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Dec 10 19:43:55 2007 -0800

    drivers/serial/uartlite.c: Add missing of_node_put
    
    There should be an of_node_put when breaking out of a loop that iterates
    using for_each_compatible_node.
    
    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_compatible_node;
    @@
    
    T *d;
    ...
    for_each_compatible_node(d,...)
      {... when != of_node_put(d)
           when != e = d
    (
       return d;
    |
    +  of_node_put(d);
    ?  return ...;
    )
    ...}
    // </smpl>
    
    Signed-off-by: Julia Lawall <[EMAIL PROTECTED]>
    Acked-by: Grant Likely <[EMAIL PROTECTED]>
    Acked-by: Peter Korsgaard <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/serial/uartlite.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c
index a85f2d3..3f59324 100644
--- a/drivers/serial/uartlite.c
+++ b/drivers/serial/uartlite.c
@@ -393,6 +393,7 @@ static inline void __init ulite_console_of_find_device(int 
id)
                        continue;
 
                ulite_ports[id].mapbase = res.start;
+               of_node_put(np);
                return;
        }
 }
-
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