upstream: [media] vb2: Check if there are buffers before streamon
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Wed, 8 Jan 2014 08:01:33 +0000 (05:01 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:54:52 +0000 (11:54 +0900)
commit83955cbd129f9433399dbc826f4fd862d5d2818f
treec4fb9437a55a98166beae2c216e3e376ba254f79
parent0ff1e13d5670fbd0d6e019e7053594830ea1c613
upstream: [media] vb2: Check if there are buffers before streamon

This patch adds a test preventing streamon() if there is no buffer
ready.

Without this patch, a user could call streamon() before
preparing any buffer. This leads to a situation where if he calls
close() before calling streamoff() the device is kept streaming.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/v4l2-core/videobuf2-core.c