From: Marek Szyprowski Date: Mon, 3 Oct 2011 06:21:45 +0000 (-0300) Subject: [media] media: vb2: fix incorrect return value X-Git-Tag: MMI-PSA29.97-13-9~18177^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4c2625db6f172114bcc4fd9e62f3c030c5fb4e4c;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [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 --- 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; }