]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/v4l2-ioctl.c
V4L/DVB (10794): v4l2: Move code to zero querybuf output struct to v4l2_ioctl
[linux-2.6-omap-h63xx.git] / drivers / media / video / v4l2-ioctl.c
index 20a571f2157736b272cd7b59a028c032f9b63586..175688e9489f83093d4f37c4682abdf6ff6a153e 100644 (file)
@@ -969,6 +969,11 @@ static long __video_do_ioctl(struct file *file,
                if (ret)
                        break;
 
+               /* Zero out all fields starting with bytesysed, which is
+                * everything but index and type.  */
+               memset(0, &p->bytesused,
+                      sizeof(*p) - offsetof(typeof(*p), bytesused));
+
                ret = ops->vidioc_querybuf(file, fh, p);
                if (!ret)
                        dbgbuf(cmd, vfd, p);