kernel-fxtec-pro1x/arch/powerpc/platforms
Julia Lawall a8e25c6154 powerpc/maple: Add of_node_put to avoid memory leak
Add a call to of_node_put in the error handling code following a call to
of_find_node_by_path.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
local idexpression x;
expression E,E1;
statement S;
@@

*x =
(of_find_node_by_path
|of_find_node_by_name
|of_find_node_by_phandle
|of_get_parent
|of_get_next_parent
|of_get_next_child
|of_find_compatible_node
|of_match_node
)(...);
...
if (x == NULL) S
<... when != x = E
*if (...) {
  ... when != of_node_put(x)
      when != if (...) { ... of_node_put(x); ... }
(
  return <+...x...+>;
|
*  return ...;
)
}
...>
of_node_put(x);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-09-02 14:07:33 +10:00
..
8xx powerpc/8xx: Add support for the MPC8xx based boards from TQC 2010-08-04 14:25:22 -05:00
40x Remove REDWOOD_[456] config options and conditional code 2010-07-26 09:06:04 -04:00
44x powerpc/44x: Add basic ICON PPC440SPe board support 2010-05-12 07:50:53 -04:00
52xx powerpc/5200: add mpc5200_psc_ac97_gpio_reset 2010-08-06 20:49:18 -06:00
82xx powerpc: remove references to of_device and to_of_device 2010-07-24 09:58:21 -06:00
83xx arch/powerpc/platforms/83xx/mpc837x_mds.c: Add missing iounmap 2010-08-31 16:38:47 -05:00
85xx powerpc/85xx: Fix compile issue with p1022_ds due to lmb rename to memblock 2010-08-31 11:41:01 -05:00
86xx Merge commit 'v2.6.35-rc6' into devicetree/next 2010-07-24 09:49:13 -06:00
512x Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6 2010-08-05 15:57:35 -07:00
amigaone of/address: Clean up function declarations 2010-08-01 01:42:42 -06:00
cell powerpc: Fix bogus it_blocksize in VIO iommu code 2010-08-24 15:26:31 +10:00
chrp include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
embedded6xx lmb: rename to memblock 2010-07-14 17:14:00 +10:00
iseries powerpc: Abstract indexing of lppaca structs 2010-09-02 14:07:31 +10:00
maple powerpc/maple: Add of_node_put to avoid memory leak 2010-09-02 14:07:33 +10:00
pasemi powerpc: remove references to of_device and to_of_device 2010-07-24 09:58:21 -06:00
powermac powerpc/powermac: Drop unnecessary null test 2010-08-24 15:26:28 +10:00
prep powerpc/kconfig: Kill PPC_MULTIPLATFORM 2009-03-11 17:11:35 +11:00
ps3 Merge branch 'master' into for-next 2010-08-04 15:14:38 +02:00
pseries powerpc/pseries: Re-enable dispatch trace log userspace interface 2010-09-02 14:07:32 +10:00
fsl_uli1575.c PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refs 2010-02-23 09:43:31 -08:00
Kconfig powerpc: Fix config dependency problem with MPIC_U3_HT_IRQS 2010-08-24 15:28:29 +10:00
Kconfig.cputype powerpc/47x: Base ppc476 support 2010-05-05 09:11:10 -04:00
Makefile powerpc/85xx: Kconfig cleanup 2009-11-20 16:45:27 -06:00