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>
Tue, 18 Nov 2014 02:56:08 +0000 (11:56 +0900)
commit9a16efc0f5aaefda33fda124e8bab094456e2293
tree798476f11f03bc454c6faa2b9a5e7a1eacd1c7f7
parentba4c627482e9b03b8f718acf137fbb082cf262eb
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