From: Julia Lawall Date: Fri, 9 Jan 2009 20:22:53 +0000 (-0800) Subject: drivers/isdn/hardware/mISDN: move a dereference below a NULL test X-Git-Tag: v2.6.29-rc2~107^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20b788045b73e81ace2498eae42220e64547d6d2;p=pandora-kernel.git drivers/isdn/hardware/mISDN: 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 Signed-off-by: Andrew Morton Signed-off-by: Karsten Keil --- Reading git-diff-tree failed