mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
media: videobuf2-core: check for q->error in vb2_core_qbuf()
[ Upstream commit b509d733d3 ]
The vb2_core_qbuf() function didn't check if q->error was set. It is
checked in __buf_prepare(), but that function isn't called if the buffer
was already prepared before with VIDIOC_PREPARE_BUF.
So check it at the start of vb2_core_qbuf() as well.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9f6d6fb580
commit
0eda747216
|
|
@ -1366,6 +1366,11 @@ int vb2_core_qbuf(struct vb2_queue *q, unsigned int index, void *pb)
|
|||
struct vb2_buffer *vb;
|
||||
int ret;
|
||||
|
||||
if (q->error) {
|
||||
dprintk(1, "fatal error occurred on queue\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
vb = q->bufs[index];
|
||||
|
||||
switch (vb->state) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user