From: Seung-Woo Kim Date: Fri, 29 Nov 2013 07:50:29 +0000 (-0300) Subject: [media] videobuf2: Add log for size checking error in __qbuf_dmabuf X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=77c0782e9729cee9d1d67cd1343ed7c3f947a36a;p=openwrt%2Fstaging%2Fblogic.git [media] videobuf2: Add log for size checking error in __qbuf_dmabuf __qbuf_dmabuf checks whether size of provided dmabuf is large enough, and it returns error without any log. So this patch adds error log in the case. Signed-off-by: Seung-Woo Kim Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c index e949a0e64be9..144caf12fb6c 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c @@ -1116,6 +1116,8 @@ static int __qbuf_dmabuf(struct vb2_buffer *vb, const struct v4l2_buffer *b) if (planes[plane].length < planes[plane].data_offset + q->plane_sizes[plane]) { + dprintk(1, "qbuf: invalid dmabuf length for plane %d\n", + plane); ret = -EINVAL; goto err; }