From: Julia Lawall Date: Tue, 14 Aug 2012 05:49:47 +0000 (+0000) Subject: drivers/net/ethernet/ti/davinci_cpdma.c: Remove potential NULL dereference X-Git-Tag: v3.6-rc3~10^2~44 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f37c54b6a6c56489221d42ff27305e4f8098e34b;p=pandora-kernel.git drivers/net/ethernet/ti/davinci_cpdma.c: Remove potential NULL dereference If the NULL test is necessary, the initialization involving a dereference of the tested value should be moved after the NULL test. The sematic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ 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: David S. Miller --- Reading git-diff-tree failed