1
linux/arch/powerpc/platforms/pseries
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
..
eeh_cache.c [POWERPC] Add CONFIG_PPC_PSERIES_DEBUG to enable debugging for platforms/pseries 2008-04-24 21:08:12 +10:00
eeh_driver.c
eeh_event.c
eeh_sysfs.c
eeh.c powerpc: use non-racy method for proc entries creation 2008-04-29 08:06:22 -07:00
firmware.c [POWERPC] Add CONFIG_PPC_PSERIES_DEBUG to enable debugging for platforms/pseries 2008-04-24 21:08:12 +10:00
hotplug-cpu.c
hotplug-memory.c [POWERPC] Update lmb data structures for hotplug memory add/remove 2008-04-29 15:57:53 +10:00
hvCall_inst.c
hvCall.S
hvconsole.c
hvcserver.c
iommu.c
Kconfig [POWERPC] Add CONFIG_PPC_PSERIES_DEBUG to enable debugging for platforms/pseries 2008-04-24 21:08:12 +10:00
kexec.c
lpar.c
Makefile [POWERPC] Hotplug memory remove notifications for powerpc 2008-04-29 15:57:52 +10:00
msi.c
nvram.c [POWERPC] Add missing of_node_put in pseries/nvram.c 2008-06-16 15:00:32 +10:00
pci_dlpar.c
pci.c
phyp_dump.c
plpar_wrappers.h
power.c
pseries.h
ras.c [POWERPC] Add CONFIG_PPC_PSERIES_DEBUG to enable debugging for platforms/pseries 2008-04-24 21:08:12 +10:00
reconfig.c powerpc: use non-racy method for proc entries creation 2008-04-29 08:06:22 -07:00
rtasd.c powerpc: use non-racy method for proc entries creation 2008-04-29 08:06:22 -07:00
scanlog.c [POWERPC] Assign PDE->data before gluing PDE into /proc tree 2008-05-05 16:47:14 +10:00
setup.c [POWERPC] Add CONFIG_PPC_PSERIES_DEBUG to enable debugging for platforms/pseries 2008-04-24 21:08:12 +10:00
smp.c [POWERPC] Add CONFIG_PPC_PSERIES_DEBUG to enable debugging for platforms/pseries 2008-04-24 21:08:12 +10:00
xics.c [POWERPC] Add CONFIG_PPC_PSERIES_DEBUG to enable debugging for platforms/pseries 2008-04-24 21:08:12 +10:00
xics.h