From: Julia Lawall Date: Wed, 16 Dec 2009 00:46:26 +0000 (-0800) Subject: drivers/video: Move dereference after NULL test X-Git-Tag: v2.6.33-rc1~71^2~127 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2a34c13e7ccec5d06eafd60e6f80ea531b34668;p=pandora-kernel.git drivers/video: Move dereference after NULL test If the NULL test on fbi 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 Cc: Krzysztof Helt Cc: Eric Miao Cc: Daniel Mack Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed