linux/arch/powerpc
Julia Lawall c6ca52ad32 arch/powerpc/sysdev/fsl_rmu.c: introduce missing kfree
rmu needs to be freed before leaving the function in an error case.

A simplified version of the semantic match that finds the problem is as
follows: (http://coccinelle.lip6.fr)

// <smpl>
@r exists@
local idexpression x;
statement S;
identifier f1;
position p1,p2;
expression *ptr != NULL;
@@

x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...x...+> }
x->f1
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2012-01-04 15:43:03 -06:00
..
boot powerpc/fsl: update compatiable on fsl 16550 uart nodes 2012-01-04 15:38:40 -06:00
configs powerpc/85xx: re-enable ePAPR byte channel driver in corenet32_smp_defconfig 2012-01-04 15:33:58 -06:00
include/asm powerpc/fsl: Add support for Integrated Flash Controller 2012-01-04 15:41:22 -06:00
kernel powerpc/44x: Enable CONFIG_RELOCATABLE for PPC44x 2011-12-20 10:21:57 -05:00
kvm powerpc: Provide a way for KVM to indicate that NV GPR values are lost 2011-12-08 14:22:53 +11:00
lib powerpc: POWER7 optimised copy_to_user/copy_from_user using VMX 2011-12-19 14:40:40 +11:00
math-emu powerpc/math_emu/efp: Look for errata handler when type mismatches 2011-10-06 23:36:47 -05:00
mm powerpc: Define virtual-physical translations for RELOCATABLE 2011-12-20 10:21:34 -05:00
net net: filter: BPF 'JIT' compiler for PPC64 2011-07-21 12:38:32 -07:00
oprofile powerpc/oprofile: Handle events that raise an exception without overflowing 2011-05-26 13:38:57 +10:00
platforms sbc834x: put full compat string in board match check 2012-01-04 15:27:59 -06:00
sysdev arch/powerpc/sysdev/fsl_rmu.c: introduce missing kfree 2012-01-04 15:43:03 -06:00
xmon powerpc/xmon: Fix #if typo for systems without MSR[RI] 2011-11-25 14:11:28 +11:00
Kconfig powerpc/fsl: Add support for Integrated Flash Controller 2012-01-04 15:41:22 -06:00
Kconfig.debug powerpc: Implement CONFIG_STRICT_DEVMEM 2011-11-28 11:42:08 +11:00
Makefile powerpc: Process dynamic relocations for kernel 2011-12-20 10:21:08 -05:00
relocs_check.pl powerpc: Process dynamic relocations for kernel 2011-12-20 10:21:08 -05:00