浏览代码

[media] media: vb2: fix incorrect return value

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>
Marek Szyprowski 14 年之前
父节点
当前提交
4c2625db6f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/media/video/videobuf2-core.c

+ 1 - 1
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 */
 		/* Check if the provided plane buffer is large enough */
 		if (planes[plane].length < q->plane_sizes[plane]) {
 		if (planes[plane].length < q->plane_sizes[plane]) {
-			ret = EINVAL;
+			ret = -EINVAL;
 			goto err;
 			goto err;
 		}
 		}