From: Julia Lawall Date: Tue, 6 Jan 2009 22:41:45 +0000 (-0800) Subject: drivers/spi: move a dereference below a NULL test X-Git-Tag: v2.6.29-rc1~318 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51e911e27690aecea01d4fe9cb22d38bdd0748ac;p=pandora-kernel.git drivers/spi: move a dereference below a NULL test In each case, if the NULL test is necessary, then the dereference should be moved below the NULL test. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ type T; expression E; identifier i,fld; statement S; @@ - T i = E->fld; + T i; ... when != E when != i if (E == NULL) S + i = E->fld; // Signed-off-by: Julia Lawall Acked-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed