V4L/DVB (9920): em28xx: fix NULL pointer dereference in call to VIDIOC_INT_RESET...
authorDevin Heitmueller <dheitmueller@linuxtv.org>
Wed, 17 Dec 2008 02:09:35 +0000 (23:09 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 23 Dec 2008 11:13:50 +0000 (09:13 -0200)
Fix a NULL pointer dereference that would occur if the video decoder tied to
the em28xx supports the VIDIOC_INT_RESET call (for example: the cx25840 driver)

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

drivers/media/video/em28xx/em28xx-video.c

index 610f535..4ea1f1e 100644 (file)
@@ -549,10 +549,11 @@ static int em28xx_config(struct em28xx *dev)
 static void em28xx_config_i2c(struct em28xx *dev)
 {
        struct v4l2_routing route;
+       int zero = 0;
 
        route.input = INPUT(dev->ctl_input)->vmux;
        route.output = 0;
-       em28xx_i2c_call_clients(dev, VIDIOC_INT_RESET, NULL);
+       em28xx_i2c_call_clients(dev, VIDIOC_INT_RESET, &zero);
        em28xx_i2c_call_clients(dev, VIDIOC_INT_S_VIDEO_ROUTING, &route);
        em28xx_i2c_call_clients(dev, VIDIOC_STREAMON, NULL);
 }