diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-11-20 13:10:43 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-11-20 13:10:43 -0200 |
commit | 6ccca5385e7178cfa2ac1d492b54ec3adef8ef7d (patch) | |
tree | bc4ea874289cf693eaeb3e619e553803e492d4c3 /linux/drivers/media | |
parent | 52499b57c6342c40212ef5de9d55da8be18e2512 (diff) | |
download | mediapointer-dvb-s2-6ccca5385e7178cfa2ac1d492b54ec3adef8ef7d.tar.gz mediapointer-dvb-s2-6ccca5385e7178cfa2ac1d492b54ec3adef8ef7d.tar.bz2 |
Fix initializations on some video_ioctl2 handlers
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/videodev.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c index bcaee23da..51cf59917 100644 --- a/linux/drivers/media/video/videodev.c +++ b/linux/drivers/media/video/videodev.c @@ -1107,9 +1107,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) @@ -1348,8 +1352,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, " @@ -1382,6 +1392,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", |