kernel-fxtec-pro1x/arch/powerpc
Julia Lawall 182f30e4b9 powerpc/cell: Add of_node_put to avoid memory leak
Add calls to of_node_put in the error handling code following calls to
of_find_node_by_path and of_find_node_by_phandle.

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
..
boot Merge remote branch 'jwb/merge' into merge 2010-08-24 14:36:45 +10:00
configs powerpc: Trim defconfigs 2010-08-09 11:19:16 +10:00
include/asm powerpc/dma: Add optional platform override of dma_set_mask() 2010-09-02 14:07:32 +10:00
kernel powerpc/dma: Add optional platform override of dma_set_mask() 2010-09-02 14:07:32 +10:00
kvm powerpc: Remove fpscr use from [kvm_]cvt_{fd,df} 2010-09-02 14:07:32 +10:00
lib powerpc: Abstract indexing of lppaca structs 2010-09-02 14:07:31 +10:00
math-emu
mm powerpc: Check end of stack canary at oops time 2010-09-02 14:07:30 +10:00
oprofile powerpc: Use is_32bit_task() helper to test 32-bit binary 2010-09-02 14:07:32 +10:00
platforms powerpc/cell: Add of_node_put to avoid memory leak 2010-09-02 14:07:33 +10:00
sysdev powerpc/dart_iommu: Support for 64-bit iommu bypass window on PCIe 2010-09-02 14:07:32 +10:00
xmon Input: sysrq - drop tty argument from sysrq ops handlers 2010-08-19 22:07:06 -07:00
Kconfig Merge branch 'timers-timekeeping-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-08-06 13:18:29 -07:00
Kconfig.debug powerpc: Unconditionally enabled irq stacks 2010-06-15 15:02:37 +10:00
Makefile powerpc: Fix typo in uImage target 2010-08-24 15:26:32 +10:00
relocs_check.pl