From: Julia Lawall Date: Thu, 27 May 2010 16:32:15 +0000 (+0200) Subject: drivers/platform/x86: Eliminate a NULL pointer dereference X-Git-Tag: v2.6.36-rc1~579^2~79 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fc8f274aef03bbe85774ba30e75deb58e8a90ff;p=pandora-kernel.git drivers/platform/x86: Eliminate a NULL pointer dereference Give different error messages if device_enum is NULL or if its type field has the wrong value. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ expression E,E1; identifier f; statement S1,S2,S3; @@ if ((E == NULL && ...) || ...) { ... when != if (...) S1 else S2 when != E = E1 * E->f ... when any return ...; } else S3 // Signed-off-by: Julia Lawall Signed-off-by: Matthew Garrett --- Reading git-diff-tree failed