From: Julia Lawall Date: Wed, 11 Aug 2010 01:01:14 +0000 (-0700) Subject: drivers/message: move dereference after NULL test X-Git-Tag: v2.6.36-rc1~271 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d23670069ad60c82234e51a945e8b472e8c7bde2;p=pandora-kernel.git drivers/message: move dereference after NULL test If the NULL test on dev->i2o_dev or i2o_dev 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: James Bottomley Cc: Kashyap Desai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed