Commit 3c728118 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] s2255: don't zero struct v4l2_streamparm

All fields after 'type' are already zeroed by the core framework.
Clearing the full struct also clears 'type', which causes a wrong
type value to be returned.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 92513611
...@@ -1476,7 +1476,6 @@ static int vidioc_g_parm(struct file *file, void *priv, ...@@ -1476,7 +1476,6 @@ static int vidioc_g_parm(struct file *file, void *priv,
struct s2255_channel *channel = fh->channel; struct s2255_channel *channel = fh->channel;
if (sp->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) if (sp->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL; return -EINVAL;
memset(sp, 0, sizeof(struct v4l2_streamparm));
sp->parm.capture.capability = V4L2_CAP_TIMEPERFRAME; sp->parm.capture.capability = V4L2_CAP_TIMEPERFRAME;
sp->parm.capture.capturemode = channel->cap_parm.capturemode; sp->parm.capture.capturemode = channel->cap_parm.capturemode;
def_num = (channel->mode.format == FORMAT_NTSC) ? 1001 : 1000; def_num = (channel->mode.format == FORMAT_NTSC) ? 1001 : 1000;
......
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