Skip to content

Commit

Permalink
V4L/DVB (4859): Fix initializations on some video_ioctl2 handlers
Browse files Browse the repository at this point in the history
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Mauro Carvalho Chehab committed Dec 10, 2006
1 parent 2aa92ff commit 7964b1b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions drivers/media/video/videodev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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, "
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 7964b1b

Please sign in to comment.