linux/arch/powerpc/platforms
Julia Lawall 75e89b02e3 [POWERPC] arch/powerpc/platforms/82xx: Add missing of_node_put
Of_get_parent and of_find_compatible_node do a of_node_get, and thus a
corresponding of_code_put is needed in both the error case and the normal
return case.

The problem was found using the following semantic match.
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T,T1,T2;
identifier E;
statement S;
expression x1,x2,x3;
int ret;
@@

  T E;
  ...
* E = \(of_get_parent\|of_find_compatible_node\)(...);
  if (E == NULL) S
  ... when != of_node_put(...,(T1)E,...)
      when != if (E != NULL) { ... of_node_put(...,(T1)E,...); ...}
      when != x1 = (T1)E
      when != E = x3;
      when any
  if (...) {
    ... when != of_node_put(...,(T2)E,...)
        when != if (E != NULL) { ... of_node_put(...,(T2)E,...); ...}
        when != x2 = (T2)E
(
*   return;
|
*   return ret;
)
  }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Kumar Gala <galak@gate.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-02-06 22:06:59 +11:00
..
8xx [POWERPC] CPM: Rename commproc to cpm1 and cpm2_common.c to cpm2.c 2008-01-28 08:31:05 -06:00
40x [POWERPC] Enable RTC for Ebony and Walnut (v2) 2008-01-25 07:07:26 -06:00
44x [POWERPC] 4xx: PIKA Warp base platform 2008-01-25 07:09:42 -06:00
52xx Suspend: Introduce begin() and end() callbacks 2008-02-01 18:30:56 -05:00
82xx [POWERPC] arch/powerpc/platforms/82xx: Add missing of_node_put 2008-02-06 22:06:59 +11:00
83xx [POWERPC] 83xx: rework platform Kconfig 2008-01-28 13:15:24 -06:00
85xx [POWERPC] 85xx: convert sbc85* boards to use machine_device_initcall 2008-01-28 13:15:26 -06:00
86xx [POWERPC] 86xx: MPC8641 HPCN - call of_platform_bus_probe() 2008-01-23 19:35:02 -06:00
cell [POWERPC] Avoid possible extra of_node_put in axon_msi.c 2008-02-06 16:30:00 +11:00
celleb [POWERPC] Have celleb use its own dma_direct_offset variable 2008-01-25 22:52:54 +11:00
chrp [POWERPC] Autodetect serial console on pegasos2 2008-01-25 22:52:55 +11:00
embedded6xx [POWERPC] 82xx and embedded6xx: Use machine_*_initcall() hooks in platform code 2008-01-28 08:30:41 -06:00
iseries iommu sg: powerpc: convert iommu to use the IOMMU helper 2008-02-05 09:44:11 -08:00
maple [POWERPC] Use <linux/of_{platform, device}.h> and not <asm/...> variants. 2008-01-17 14:58:57 +11:00
pasemi pasemi: Fix thinko in dma_direct_ops setup 2008-02-01 21:03:36 +11:00
powermac Merge branch 'linux-2.6' 2008-01-31 11:25:51 +11:00
prep [POWERPC] Split several platforms into their respective Kconfig file 2007-03-22 10:07:32 -05:00
ps3 [POWERPC] PS3: Remove lpar address workaround 2008-01-25 22:52:53 +11:00
pseries [POWERPC] arch/powerpc/platforms/pseries: Add missing of_node_put 2008-02-06 22:06:59 +11:00
fsl_uli1575.c [POWERPC] Fix interrupt routing and setup of ULI M1575 on FSL boards 2007-08-17 13:22:16 -05:00
Kconfig [POWERPC] 83xx: rework platform Kconfig 2008-01-28 13:15:24 -06:00
Kconfig.cputype [POWERPC] 83xx: rework platform Kconfig 2008-01-28 13:15:24 -06:00
Makefile [POWERPC] Walnut board support 2007-09-07 07:51:24 -05:00