From: Julia Lawall Date: Tue, 14 Aug 2012 14:49:46 +0000 (-0300) Subject: [media] drivers/media/usb/{s2255drv.c, tm6000/tm6000-alsa.c, tm6000/tm6000-input... X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~3^2^2~365 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e839776f9dfe1eda232755d5cab6eacc59208b4b;p=pandora-kernel.git [media] drivers/media/usb/{s2255drv.c, tm6000/tm6000-alsa.c, tm6000/tm6000-input.c}: Remove potential NULL dereferences 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