V4L/DVB (5554): Fix: vidioc_g_parm were not zeroing the memory

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
Mauro Carvalho Chehab 2007-04-24 13:40:07 -03:00
Родитель 3f6892aca5
Коммит 2aa2342f2b
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -1404,6 +1404,11 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_G_PARM: case VIDIOC_G_PARM:
{ {
struct v4l2_streamparm *p=arg; struct v4l2_streamparm *p=arg;
__u32 type=p->type;
memset(p,0,sizeof(*p));
p->type=type;
if (vfd->vidioc_g_parm) { if (vfd->vidioc_g_parm) {
ret=vfd->vidioc_g_parm(file, fh, p); ret=vfd->vidioc_g_parm(file, fh, p);
} else { } else {
@ -1415,8 +1420,6 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
v4l2_video_std_construct(&s, vfd->current_norm, v4l2_video_std_construct(&s, vfd->current_norm,
v4l2_norm_to_name(vfd->current_norm)); v4l2_norm_to_name(vfd->current_norm));
memset(p,0,sizeof(*p));
p->parm.capture.timeperframe = s.frameperiod; p->parm.capture.timeperframe = s.frameperiod;
ret=0; ret=0;
} }