]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[media] s2255: don't zero struct v4l2_streamparm
authorHans Verkuil <hans.verkuil@cisco.com>
Fri, 15 Feb 2013 09:07:13 +0000 (06:07 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 5 Mar 2013 18:40:25 +0000 (15:40 -0300)
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: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/usb/s2255/s2255drv.c

index 9693eb9d9e8df5e1e8ad85b054bab3eae4bd6b4b..eaae9d167e760ccd3a8efa73ff66f4af670847a5 100644 (file)
@@ -1476,7 +1476,6 @@ static int vidioc_g_parm(struct file *file, void *priv,
        struct s2255_channel *channel = fh->channel;
        if (sp->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
                return -EINVAL;
-       memset(sp, 0, sizeof(struct v4l2_streamparm));
        sp->parm.capture.capability = V4L2_CAP_TIMEPERFRAME;
        sp->parm.capture.capturemode = channel->cap_parm.capturemode;
        def_num = (channel->mode.format == FORMAT_NTSC) ? 1001 : 1000;