upstream: [media] vb2: properly clean up PREPARED and QUEUED buffers
authorHans Verkuil <hans.verkuil@cisco.com>
Fri, 28 Feb 2014 15:49:18 +0000 (12:49 -0300)
committerChanho Park <chanho61.park@samsung.com>
Thu, 7 Aug 2014 05:26:26 +0000 (14:26 +0900)
commit7457a2ee093e636517215d589c407312f4d61f0a
tree5c4ef2eb472c58b83a08fd0290a07f3147757bb5
parenta09fe94aa29323e2fbc36c5846cef95380c2a13e
upstream: [media] vb2: properly clean up PREPARED and QUEUED buffers

If __reqbufs was called then existing buffers are freed. However, if that
happens without ever having started STREAMON, but if buffers have been queued,
then the buf_finish op is never called.

Add a call to __vb2_queue_cancel in __reqbufs so that these buffers are
cleaned up there as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/v4l2-core/videobuf2-core.c