From: Julia Lawall Date: Sat, 17 Oct 2009 06:34:39 +0000 (+0200) Subject: ACPI: Move dereference after NULL test X-Git-Tag: v2.6.32-rc7~65^2~1^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5cfa245b0b63c3d79568e78a1ee3d00654d5517d;p=pandora-kernel.git ACPI: Move dereference after NULL test If the NULL test on pr is needed, then the dereference should be after the NULL test. A simplified version of the semantic match that detects this problem is as follows (http://coccinelle.lip6.fr/): // @match exists@ expression x, E; identifier fld; @@ * x->fld ... when != \(x = E\|&x\) * x == NULL // Signed-off-by: Julia Lawall Signed-off-by: Andrew Morton Signed-off-by: Len Brown --- Reading git-diff-tree failed