[media] media: vb2: fix incorrect return value
authorMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 3 Oct 2011 06:21:45 +0000 (03:21 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 19 Oct 2011 09:57:25 +0000 (07:57 -0200)
This patch fixes incorrect return value. Errors should be returned
as negative numbers.

Reported-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/videobuf2-core.c

index 6687ac33726a7fb4bdbb470a9cc4590c90843f0d..3f5c7a38e6e885d28e3ae5c5f982377aa4285aae 100644 (file)
@@ -751,7 +751,7 @@ static int __qbuf_userptr(struct vb2_buffer *vb, struct v4l2_buffer *b)
 
                /* Check if the provided plane buffer is large enough */
                if (planes[plane].length < q->plane_sizes[plane]) {
-                       ret = EINVAL;
+                       ret = -EINVAL;
                        goto err;
                }