Re: [PATCH] videobuf2-core: remove duplicated code

From: Marek Szyprowski
Date: Wed May 21 2014 - 06:36:37 EST


Hello,

On 2014-05-21 11:48, Victor Lambret wrote:
Remove duplicated test of buffer presence at streamon

Signed-off-by: Victor Lambret <victor.lambret.ext@xxxxxxxxxx>

Acked-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>

---
drivers/media/v4l2-core/videobuf2-core.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
index f9059bb..b731b66 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -2067,10 +2067,6 @@ static int vb2_internal_streamon(struct vb2_queue *q, enum v4l2_buf_type type)
return -EINVAL;
}
- if (!q->num_buffers) {
- dprintk(1, "streamon: no buffers have been allocated\n");
- return -EINVAL;
- }
if (q->num_buffers < q->min_buffers_needed) {
dprintk(1, "streamon: need at least %u allocated buffers\n",
q->min_buffers_needed);

Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/