[media] videobuf2: Add log for size checking error in __qbuf_dmabuf
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 29 Nov 2013 07:50:29 +0000 (04:50 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Mon, 9 Dec 2013 13:42:16 +0000 (11:42 -0200)
__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 <sw0312.kim@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/v4l2-core/videobuf2-core.c

index e949a0e..144caf1 100644 (file)
@@ -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;
                }