1
linux/arch/powerpc
Julia Lawall bad5232ba2 [POWERPC] Add missing of_node_put in pseries/nvram.c
of_node_put is needed before discarding a value received from
of_find_node_by_type, eg in error handling code.

The semantic patch that makes the change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
struct device_node *n;
struct device_node *n1;
struct device_node *n2;
statement S;
identifier f1,f2;
expression E1,E2;
constant C;
@@

n = of_find_node_by_type(...)
...
if (!n) S
... when != of_node_put(n)
    when != n1 = f1(n,...)
    when != E1 = n
    when any
    when strict
(
+ of_node_put(n);
  return -C;
|
  of_node_put(n);
|
  n2 = f2(n,...)
|
  E2 = n
|
  return ...;
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-06-16 15:00:32 +10:00
..
boot Merge branch 'for-2.6.26' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into merge 2008-06-16 14:30:47 +10:00
configs [POWERPC] 83xx: MPC837xRDB's VSC7385 ethernet switch isn't on the MDIO bus 2008-06-10 09:19:26 -05:00
kernel [POWERPC] Fix return value check logic in debugfs virq_mapping setup 2008-06-16 15:00:25 +10:00
kvm KVM: ppc: Report bad GFNs 2008-06-06 21:22:41 +03:00
lib [POWERPC] ppc: More compile fixes 2008-05-12 22:57:51 +10:00
math-emu [POWERPC] Replace remaining __FUNCTION__ occurrences 2008-04-01 20:43:09 +11:00
mm [POWERPC] Make walk_memory_resource available with MEMORY_HOTPLUG=n 2008-06-09 11:32:41 +10:00
oprofile Merge branch 'linux-2.6' 2008-04-14 21:11:02 +10:00
platforms [POWERPC] Add missing of_node_put in pseries/nvram.c 2008-06-16 15:00:32 +10:00
sysdev rtc-ds1374: rename device to just "ds1374" 2008-06-06 11:29:10 -07:00
xmon powerpc/spufs: remove class_0_dsisr from spu exception handling 2008-06-16 14:35:00 +10:00
.gitignore
Kconfig [RAPIDIO] Add RapidIO option to kernel configuration 2008-04-29 19:40:27 +10:00
Kconfig.debug [POWERPC] Add IRQSTACKS support on ppc32 2008-04-29 15:57:34 +10:00
Makefile [POWERPC] bootwrapper: add simpleImage* to list of boot targets 2008-06-11 07:42:34 -04:00