From: Julia Lawall Date: Sat, 17 Oct 2009 06:41:47 +0000 (+0200) Subject: drivers/ata/libata: Move dereference after NULL test X-Git-Tag: v2.6.32-rc7~81^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1104016ce8f7750ecd8ca6129786bc549aa5c38;p=pandora-kernel.git drivers/ata/libata: Move dereference after NULL test In each case, if the NULL test on qc is needed, then the derefernce 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: Jeff Garzik --- Reading git-diff-tree failed