Commit 7964b1b1 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

V4L/DVB (4859): Fix initializations on some video_ioctl2 handlers

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 2aa92ffd
...@@ -1088,9 +1088,13 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, ...@@ -1088,9 +1088,13 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_G_AUDIO: case VIDIOC_G_AUDIO:
{ {
struct v4l2_audio *p=arg; struct v4l2_audio *p=arg;
__u32 index=p->index;
if (!vfd->vidioc_g_audio) if (!vfd->vidioc_g_audio)
break; break;
memset(p,0,sizeof(*p));
p->index=index;
dbgarg(cmd, "Get for index=%d\n", p->index); dbgarg(cmd, "Get for index=%d\n", p->index);
ret=vfd->vidioc_g_audio(file, fh, p); ret=vfd->vidioc_g_audio(file, fh, p);
if (!ret) if (!ret)
...@@ -1329,8 +1333,14 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, ...@@ -1329,8 +1333,14 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_G_TUNER: case VIDIOC_G_TUNER:
{ {
struct v4l2_tuner *p=arg; struct v4l2_tuner *p=arg;
__u32 index=p->index;
if (!vfd->vidioc_g_tuner) if (!vfd->vidioc_g_tuner)
break; break;
memset(p,0,sizeof(*p));
p->index=index;
ret=vfd->vidioc_g_tuner(file, fh, p); ret=vfd->vidioc_g_tuner(file, fh, p);
if (!ret) if (!ret)
dbgarg (cmd, "index=%d, name=%s, type=%d, " dbgarg (cmd, "index=%d, name=%s, type=%d, "
...@@ -1363,6 +1373,9 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, ...@@ -1363,6 +1373,9 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
struct v4l2_frequency *p=arg; struct v4l2_frequency *p=arg;
if (!vfd->vidioc_g_frequency) if (!vfd->vidioc_g_frequency)
break; break;
memset(p,0,sizeof(*p));
ret=vfd->vidioc_g_frequency(file, fh, p); ret=vfd->vidioc_g_frequency(file, fh, p);
if (!ret) if (!ret)
dbgarg (cmd, "tuner=%d, type=%d, frequency=%d\n", dbgarg (cmd, "tuner=%d, type=%d, frequency=%d\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment