]> git.baikalelectronics.ru Git - kernel.git/commit
media: v4l2-ioctl.c: readbuffers depends on V4L2_CAP_READWRITE
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 3 Nov 2021 12:28:31 +0000 (12:28 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 15 Nov 2021 08:12:04 +0000 (08:12 +0000)
commitbd0e35088460fc76c0bf66fe4f6a6a5122bb1500
tree9fe5a594c5909d789d342e2f4feeccf4be74d3d6
parentdf1e7e935b09fd5fce6d4ea6b6d233f6a3286c72
media: v4l2-ioctl.c: readbuffers depends on V4L2_CAP_READWRITE

If V4L2_CAP_READWRITE is not set, then readbuffers must be set to 0,
otherwise v4l2-compliance will complain.

A note on the Fixes tag below: this patch does not really fix that commit,
but it can be applied from that commit onwards. For older code there is no
guarantee that device_caps is set, so even though this patch would apply,
it will not work reliably.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Fixes: 546c8230d03f (media: v4l2-dev: fix WARN_ON(!vdev->device_caps))
Cc: <stable@vger.kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/v4l2-core/v4l2-ioctl.c