summaryrefslogtreecommitdiffstats
path: root/drivers/serial/uartlite.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2007-12-11 00:49:28 +0100
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-12-11 04:43:55 +0100
commit76832d8416430d6dd0575579ca1e00d1a790f4cb (patch)
treeea023cf43ba81487b8361c7ccf5cd9a9cdf9aabd /drivers/serial/uartlite.c
parenthugetlb: handle write-protection faults in follow_hugetlb_page (diff)
downloadlinux-76832d8416430d6dd0575579ca1e00d1a790f4cb.tar.xz
linux-76832d8416430d6dd0575579ca1e00d1a790f4cb.zip
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 <julia@diku.dk> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/serial/uartlite.c')
-rw-r--r--drivers/serial/uartlite.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c
index a85f2d31a686..3f593247c41e 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;
}
}