]> git.itanic.dy.fi Git - linux-stable/commit
media: vb2: don't call __vb2_queue_cancel if vb2_start_streaming failed
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 28 Nov 2018 08:37:43 +0000 (03:37 -0500)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 11 Feb 2019 17:54:18 +0000 (17:54 +0000)
commita1907fd0fa85339ac0b4fba6c30c46e339f27196
tree56bfaf64230c93ae43abe518559e7327229561ef
parent1c38b9d9e74a24a8ed9089429031f6d7721b6df0
media: vb2: don't call __vb2_queue_cancel if vb2_start_streaming failed

commit 04990215dec43c424daff00d1f622167b8aafd1f upstream.

vb2_start_streaming() already rolls back the buffers, so there is no
need to call __vb2_queue_cancel(). Especially since __vb2_queue_cancel()
does too much, such as zeroing the q->queued_count value, causing vb2
to think that no buffers have been queued.

It appears that this call to __vb2_queue_cancel() is a left-over from
before commit b3379c6201bb3.

Fixes: b3379c6201bb3 ('vb2: only call start_streaming if sufficient buffers are queued')
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
[bwh: Backported to 3.16: adjust filename, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/media/v4l2-core/videobuf2-core.c