Commit 72f1fc33 authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Mauro Carvalho Chehab

[media] v4l2: vb2: simplify __vb2_queue_free function

__vb2_queue_free function doesn't really return anything useful. This patch
removes support for the return value to simplify the code.
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 31901a07
...@@ -227,7 +227,7 @@ static void __vb2_free_mem(struct vb2_queue *q) ...@@ -227,7 +227,7 @@ static void __vb2_free_mem(struct vb2_queue *q)
* and return the queue to an uninitialized state. Might be called even if the * and return the queue to an uninitialized state. Might be called even if the
* queue has already been freed. * queue has already been freed.
*/ */
static int __vb2_queue_free(struct vb2_queue *q) static void __vb2_queue_free(struct vb2_queue *q)
{ {
unsigned int buffer; unsigned int buffer;
...@@ -251,8 +251,6 @@ static int __vb2_queue_free(struct vb2_queue *q) ...@@ -251,8 +251,6 @@ static int __vb2_queue_free(struct vb2_queue *q)
q->num_buffers = 0; q->num_buffers = 0;
q->memory = 0; q->memory = 0;
return 0;
} }
/** /**
...@@ -505,9 +503,7 @@ int vb2_reqbufs(struct vb2_queue *q, struct v4l2_requestbuffers *req) ...@@ -505,9 +503,7 @@ int vb2_reqbufs(struct vb2_queue *q, struct v4l2_requestbuffers *req)
return -EBUSY; return -EBUSY;
} }
ret = __vb2_queue_free(q); __vb2_queue_free(q);
if (ret != 0)
return ret;
/* /*
* In case of REQBUFS(0) return immediately without calling * In case of REQBUFS(0) return immediately without calling
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment