]> www.infradead.org Git - users/jedix/linux-maple.git/commit
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>
Fri, 6 Aug 2021 08:46:11 +0000 (10:46 +0200)
commitf61944bbc698bb82672668b33ebb54dec6c16a42
treeccac58eb3a356f83de323e6955e44d7e965b84d6
parent92852963f78ef383effe0ce262b0e403ecd6a277
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