summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/em28xx/em28xx-video.c
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@linuxtv.org>2008-12-16 21:09:35 -0500
committerDevin Heitmueller <dheitmueller@linuxtv.org>2008-12-16 21:09:35 -0500
commit0d788195b491c7c18524b30618f44059eb35bc06 (patch)
tree26c14fac4f9fb6efce28147ec83ffdc7613f926a /linux/drivers/media/video/em28xx/em28xx-video.c
parenta015d228d3c58d1377600c5a06914a06e4e6be36 (diff)
downloadmediapointer-dvb-s2-0d788195b491c7c18524b30618f44059eb35bc06.tar.gz
mediapointer-dvb-s2-0d788195b491c7c18524b30618f44059eb35bc06.tar.bz2
em28xx: fix NULL pointer dereference in call to VIDIOC_INT_RESET command
From: Devin Heitmueller <dheitmueller@linuxtv.org> 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) Priority: high Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/video/em28xx/em28xx-video.c')
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-video.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c
index ff960f90c..f3c9e2331 100644
--- a/linux/drivers/media/video/em28xx/em28xx-video.c
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c
@@ -555,10 +555,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);
}