linux/arch/powerpc
Julia Lawall af449c330e [POWERPC] arch/powerpc: Add missing of_node_put
There should be an of_node_put when breaking out of a loop that iterates
over calls to of_find_all_nodes, as this function does an of_node_get on
the value it returns.

This was fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
identifier d;
expression e;
@@

T *d;
...
for (d = NULL; (d = of_find_all_nodes(d)) != NULL; )
 {... 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: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-20 17:13:51 +11:00
..
boot [POWERPC] Use embedded dtc in kernel builds 2007-12-20 16:18:00 +11:00
configs [POWERPC] 83xx: Add MPC837x MDS default kernel configuration 2007-12-11 13:57:18 -06:00
kernel [POWERPC] arch/powerpc: Remove duplicate includes 2007-12-20 17:13:50 +11:00
lib [POWERPC] rheap: Changes config mechanism 2007-10-16 17:09:21 -06:00
math-emu [POWERPC] Fix handling of stfiwx math emulation 2007-10-16 09:05:24 -05:00
mm [POWERPC] Fake NUMA emulation for PowerPC 2007-12-20 16:11:46 +11:00
oprofile [POWERPC] OProfile: fix cbe pm signal routing problem 2007-12-19 01:00:01 +01:00
platforms [POWERPC] arch/powerpc: Add missing of_node_put 2007-12-20 17:13:51 +11:00
sysdev [POWERPC] pci32: Add flags modifying the PCI code behaviour 2007-12-20 16:18:07 +11:00
xmon [POWERPC] Update xmon slb code 2007-12-11 13:46:05 +11:00
.gitignore [POWERPC] Add files build to .gitignore 2006-12-04 20:41:29 +11:00
Kconfig Fix boot problem with iSeries lacking hugepage support 2007-11-29 09:24:51 -08:00
Kconfig.debug [POWERPC] Early debug forces console log level to max 2007-12-11 15:43:35 +11:00
Makefile [POWERPC] Implement 'make bootwrapper_install' 2007-12-06 14:44:30 +11:00