This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media-tree.git tree:
Subject: V4L/DVB: drivers/media/video/em28xx: Remove potential NULL dereference Author: Julia Lawall <[email protected]> Date: Fri Aug 27 02:57:18 2010 -0300 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/) // <smpl> @@ 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; // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]> drivers/media/video/em28xx/em28xx-video.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) --- http://git.linuxtv.org/media-tree.git?a=commitdiff;h=9506c23c3e2628b5366f59dba4bdee6f64aa1800 diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index 7b9ec6e..95a4b60 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c @@ -277,12 +277,13 @@ static void em28xx_copy_vbi(struct em28xx *dev, { void *startwrite, *startread; int offset; - int bytesperline = dev->vbi_width; + int bytesperline; if (dev == NULL) { em28xx_isocdbg("dev is null\n"); return; } + bytesperline = dev->vbi_width; if (dma_q == NULL) { em28xx_isocdbg("dma_q is null\n"); _______________________________________________ linuxtv-commits mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
