[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)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 11 Mar 2014 09:56:42 +0000 (06:56 -0300)
commitfb64dca805f091b52dbe8d6504390f63d961cbbd
treeb59ed4fbf27469d229bd97159e18d9204d32cfb5
parentb3379c6201bb3555298cdbf0aa004af260f2a6a4
[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