From: Julia Lawall Date: Fri, 27 Aug 2010 05:57:18 +0000 (-0300) Subject: V4L/DVB: drivers/media/video/em28xx: Remove potential NULL dereference X-Git-Tag: v2.6.37-rc1~64^2~462 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b81bef8cde141d8d8172a35633af27e17cf487a;p=pandora-kernel.git V4L/DVB: drivers/media/video/em28xx: 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: Mauro Carvalho Chehab --- Reading git-diff-tree failed