Browse Source

[media] v4l2-ioctl: clear the reserved field of v4l2_create_buffers

This field was never cleared by the kernel making future extensions
hard to implement. Clear it now.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Hans Verkuil 10 years ago
parent
commit
5d3512514a
1 changed files with 2 additions and 0 deletions
  1. 2 0
      drivers/media/v4l2-core/v4l2-ioctl.c

+ 2 - 0
drivers/media/v4l2-core/v4l2-ioctl.c

@@ -1805,6 +1805,8 @@ static int v4l_create_bufs(const struct v4l2_ioctl_ops *ops,
 	if (ret)
 		return ret;
 
+	CLEAR_AFTER_FIELD(create, format);
+
 	v4l_sanitize_format(&create->format);
 
 	ret = ops->vidioc_create_bufs(file, fh, create);