Skip to content

Commit

Permalink
V4L/DVB (5554): Fix: vidioc_g_parm were not zeroing the memory
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 Apr 27, 2007
1 parent 3f6892a commit 2aa2342
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/media/video/videodev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1404,6 +1404,11 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_G_PARM:
{
struct v4l2_streamparm *p=arg;
__u32 type=p->type;

memset(p,0,sizeof(*p));
p->type=type;

if (vfd->vidioc_g_parm) {
ret=vfd->vidioc_g_parm(file, fh, p);
} else {
Expand All @@ -1415,8 +1420,6 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
v4l2_video_std_construct(&s, vfd->current_norm,
v4l2_norm_to_name(vfd->current_norm));

memset(p,0,sizeof(*p));

p->parm.capture.timeperframe = s.frameperiod;
ret=0;
}
Expand Down

0 comments on commit 2aa2342

Please sign in to comment.