[media] vb2-core: add support for count == 0 in create_bufs
authorHans Verkuil <hans.verkuil@cisco.com>
Fri, 22 Jun 2012 08:44:14 +0000 (05:44 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 6 Jul 2012 20:29:14 +0000 (17:29 -0300)
commitf05393d2eb45b3cc9663223c3709134ccef51290
treebb4f0fd983a8454a872dfa41df441ff9458991f9
parent37d9ed94b97efdacf1cbff91216920d1a620b8cd
[media] vb2-core: add support for count == 0 in create_bufs

This also fixes incorrect error handling in create_bufs: the return code
of __vb2_queue_alloc is the number of allocated buffers, and not a
traditional error code.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/videobuf2-core.c