linux/arch/arm/plat-pxa
Julia Lawall 077de1ad5a [ARM] pxa: avoid NULL dereferencing in error handling of ssp.c
The assignments of res to the results of the two calls to
platform_get_resource make it impossible to use res in the error handling
code in the arguments to release_mem_region.

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

// <smpl>
@r exists@
expression E, E1;
identifier f;
statement S1,S3;
iterator iter;
@@

if ((E == NULL && ...) || ...)
{
 ... when != false ((E == NULL && ...) || ...)
     when != true  ((E != NULL && ...) || ...)
     when != iter(E,...) S1
     when != E = E1
(
 sizeof(E->f)
|
* E->f
)
 ... when any
 return ...;
}
else S3
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-05-11 17:24:59 +02:00
..
include/plat [ARM] mmp: support ssp in pxa168 2010-05-11 17:24:59 +02:00
dma.c arch/arm/plat-pxa/dma.c: correct NULL test 2010-05-01 11:33:00 +01:00
gpio.c [ARM] pxa: use kzalloc() in pxa_init_gpio_chip() 2009-07-03 14:17:51 +08:00
Kconfig [ARM] pxa: move ssp into common plat-pxa 2010-05-11 17:24:58 +02:00
Makefile [ARM] pxa: move ssp into common plat-pxa 2010-05-11 17:24:58 +02:00
mfp.c [ARM] pxa: ensure mfp is in correct range in mfp_{read,write} 2009-11-17 00:50:10 +08:00
pwm.c 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
ssp.c [ARM] pxa: avoid NULL dereferencing in error handling of ssp.c 2010-05-11 17:24:59 +02:00