From: Julia Lawall Date: Mon, 22 Mar 2010 08:11:55 +0000 (+0800) Subject: [ARM] pxa: avoid NULL dereferencing in error handling of ssp.c X-Git-Tag: v2.6.35-rc1~503^2~1^2~2^2~39 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=077de1ad5ad8b4e08fd8853ae7e4cc628c1a369b;p=pandora-kernel.git [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/) // @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 // Signed-off-by: Julia Lawall Signed-off-by: Eric Miao --- Reading git-diff-tree failed