Commit 5ab215ee authored by Jacob Chen's avatar Jacob Chen
Browse files

media: videobuf2: quick fix for dmabuf type


It's a bug in 4.4 kernel

Change-Id: I38807830d1a4289af65ebaed9c9ab179d2328827
Signed-off-by: default avatarJacob Chen <jacob2.chen@rock-chips.com>
parent 1750e8d8
No related merge requests found
Showing with 3 additions and 0 deletions
+3 -0
......@@ -105,6 +105,9 @@ static int __verify_length(struct vb2_buffer *vb, const struct v4l2_buffer *b)
length = (b->memory == VB2_MEMORY_USERPTR)
? b->length : vb->planes[0].length;
if (b->memory == VB2_MEMORY_DMABUF)
return 0;
if (b->bytesused > length)
return -EINVAL;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment