Skip to content

Commit

Permalink
[media] v4l2: vb2: simplify __vb2_queue_free function
Browse files Browse the repository at this point in the history
__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: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Marek Szyprowski authored and Mauro Carvalho Chehab committed Mar 22, 2011
1 parent 31901a0 commit 72f1fc3
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/media/video/videobuf2-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
* 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;

Expand All @@ -251,8 +251,6 @@ static int __vb2_queue_free(struct vb2_queue *q)

q->num_buffers = 0;
q->memory = 0;

return 0;
}

/**
Expand Down Expand Up @@ -505,9 +503,7 @@ int vb2_reqbufs(struct vb2_queue *q, struct v4l2_requestbuffers *req)
return -EBUSY;
}

ret = __vb2_queue_free(q);
if (ret != 0)
return ret;
__vb2_queue_free(q);

/*
* In case of REQBUFS(0) return immediately without calling
Expand Down

0 comments on commit 72f1fc3

Please sign in to comment.