]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] videobuf2-core: remove duplicated code
authorVictor Lambret <victor.lambret.ext@parrot.com>
Wed, 21 May 2014 09:48:43 +0000 (06:48 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Sat, 24 May 2014 20:03:15 +0000 (17:03 -0300)
Remove duplicated test of buffer presence at streamon

Signed-off-by: Victor Lambret <victor.lambret.ext@parrot.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/v4l2-core/videobuf2-core.c

index 6489c991700a9c651e719ce61e32b9ca013bcd54..349e659d75fb861359165665638fad93a2293631 100644 (file)
@@ -2151,10 +2151,6 @@ static int vb2_internal_streamon(struct vb2_queue *q, enum v4l2_buf_type type)
                return -EINVAL;
        }
 
-       if (!q->num_buffers) {
-               dprintk(1, "no buffers have been allocated\n");
-               return -EINVAL;
-       }
        if (q->num_buffers < q->min_buffers_needed) {
                dprintk(1, "need at least %u allocated buffers\n",
                                q->min_buffers_needed);