From: Seung-Woo Kim Date: Tue, 20 Aug 2013 07:48:06 +0000 (-0300) Subject: [media] videobuf2: Add log for size checking error in __qbuf_userptr X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2484a7e2bdb4ed50393fa57075d43ca67801fe06;p=openwrt%2Fstaging%2Fblogic.git [media] videobuf2: Add log for size checking error in __qbuf_userptr __qbuf_userptr checks whether provided buffer is large enough, and it returns error without any log. Signed-off-by: Seung-Woo Kim Signed-off-by: Heejin Woo Signed-off-by: Sylwester Nawrocki 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 67ddadd5ea38..ba389f58eec7 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c @@ -1013,6 +1013,10 @@ static int __qbuf_userptr(struct vb2_buffer *vb, const struct v4l2_buffer *b) /* Check if the provided plane buffer is large enough */ if (planes[plane].length < q->plane_sizes[plane]) { + dprintk(1, "qbuf: provided buffer size %u is less than " + "setup size %u for plane %d\n", + planes[plane].length, + q->plane_sizes[plane], plane); ret = -EINVAL; goto err; }