aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/videodev.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index fdfef0b5331..80ac5f86d9e 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -1404,6 +1404,11 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1404 case VIDIOC_G_PARM: 1404 case VIDIOC_G_PARM:
1405 { 1405 {
1406 struct v4l2_streamparm *p=arg; 1406 struct v4l2_streamparm *p=arg;
1407 __u32 type=p->type;
1408
1409 memset(p,0,sizeof(*p));
1410 p->type=type;
1411
1407 if (vfd->vidioc_g_parm) { 1412 if (vfd->vidioc_g_parm) {
1408 ret=vfd->vidioc_g_parm(file, fh, p); 1413 ret=vfd->vidioc_g_parm(file, fh, p);
1409 } else { 1414 } else {
@@ -1415,8 +1420,6 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
1415 v4l2_video_std_construct(&s, vfd->current_norm, 1420 v4l2_video_std_construct(&s, vfd->current_norm,
1416 v4l2_norm_to_name(vfd->current_norm)); 1421 v4l2_norm_to_name(vfd->current_norm));
1417 1422
1418 memset(p,0,sizeof(*p));
1419
1420 p->parm.capture.timeperframe = s.frameperiod; 1423 p->parm.capture.timeperframe = s.frameperiod;
1421 ret=0; 1424 ret=0;
1422 } 1425 }