From 4c2625db6f172114bcc4fd9e62f3c030c5fb4e4c Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Mon, 3 Oct 2011 03:21:45 -0300 Subject: [PATCH] [media] media: vb2: fix incorrect return value This patch fixes incorrect return value. Errors should be returned as negative numbers. Reported-by: Tomasz Stanislawski Signed-off-by: Marek Szyprowski Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/videobuf2-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/video/videobuf2-core.c b/drivers/media/video/videobuf2-core.c index 6687ac33726a..3f5c7a38e6e8 100644 --- a/drivers/media/video/videobuf2-core.c +++ b/drivers/media/video/videobuf2-core.c @@ -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; } -- 2.20.1