summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-02-24 13:41:20 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-03-11 06:56:41 -0300
commita7afcaccfab2fb012841852eaead79861dc9cb5f (patch)
tree48608d82c9e908484477fd3220435c54545712bd /include/media
parent6ea3b980f058d9dbc79ba88c652d581fa2d00792 (diff)
downloadlinux-stable-a7afcaccfab2fb012841852eaead79861dc9cb5f.tar.gz
linux-stable-a7afcaccfab2fb012841852eaead79861dc9cb5f.tar.bz2
linux-stable-a7afcaccfab2fb012841852eaead79861dc9cb5f.zip
[media] vb2: don't init the list if there are still buffers
__vb2_queue_free() would init the queued_list at all times, even if q->num_buffers > 0. This should only happen if num_buffers == 0. This situation can happen if a CREATE_BUFFERS call couldn't allocate enough buffers and had to free those it did manage to allocate before returning an error. While we're at it: __vb2_queue_alloc() returns the number of buffers allocated, not an error code. So stick the result in allocated_buffers instead of ret as that's very confusing. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'include/media')
0 files changed, 0 insertions, 0 deletions