diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-11-20 16:10:43 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-12-10 12:04:59 +0100 |
commit | 7964b1b1c27dea88eb89b10f774893ec11cf973d (patch) | |
tree | 31778358758d9cb6c23a0f32a034f116a85ac47d /drivers/media/video/videodev.c | |
parent | V4L/DVB (4858): Fix: implement missing VIDIOCSTUNER on v4l1-compat module (diff) | |
download | linux-7964b1b1c27dea88eb89b10f774893ec11cf973d.tar.xz linux-7964b1b1c27dea88eb89b10f774893ec11cf973d.zip |
V4L/DVB (4859): Fix initializations on some video_ioctl2 handlers
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/videodev.c')
-rw-r--r-- | drivers/media/video/videodev.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c index 41ec0c4b35a2..9024ea2557fd 100644 --- a/drivers/media/video/videodev.c +++ b/drivers/media/video/videodev.c @@ -1088,9 +1088,13 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, case VIDIOC_G_AUDIO: { struct v4l2_audio *p=arg; + __u32 index=p->index; if (!vfd->vidioc_g_audio) break; + + memset(p,0,sizeof(*p)); + p->index=index; dbgarg(cmd, "Get for index=%d\n", p->index); ret=vfd->vidioc_g_audio(file, fh, p); if (!ret) @@ -1329,8 +1333,14 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, case VIDIOC_G_TUNER: { struct v4l2_tuner *p=arg; + __u32 index=p->index; + if (!vfd->vidioc_g_tuner) break; + + memset(p,0,sizeof(*p)); + p->index=index; + ret=vfd->vidioc_g_tuner(file, fh, p); if (!ret) dbgarg (cmd, "index=%d, name=%s, type=%d, " @@ -1363,6 +1373,9 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, struct v4l2_frequency *p=arg; if (!vfd->vidioc_g_frequency) break; + + memset(p,0,sizeof(*p)); + ret=vfd->vidioc_g_frequency(file, fh, p); if (!ret) dbgarg (cmd, "tuner=%d, type=%d, frequency=%d\n", |