OSDN Git Service

media: videobuf2-core: sanity checks for requests and qbuf
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 29 Jul 2021 13:36:27 +0000 (15:36 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 30 Sep 2021 08:07:38 +0000 (10:07 +0200)
commit9015fcc256d3a74d4fdc3d87877e270968550444
tree04963a1de6e89da5dd39825c35a344a5878e405b
parentb72dd0f390aa34da510a34bb3f8fbb8d6d38f678
media: videobuf2-core: sanity checks for requests and qbuf

The combination of supports_requests == 1 and min_buffers_needed > 0
is not allowed, WARN on that and return an error.

Also check that if vb2_core_qbuf() is called from req_queue, that it
doesn't return an error, unless it is -EIO.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/common/videobuf2/videobuf2-core.c