Skip to content

Commit

Permalink
media: videobuf2: quick fix for dmabuf type
Browse files Browse the repository at this point in the history
It's a bug in 4.4 kernel

Change-Id: I38807830d1a4289af65ebaed9c9ab179d2328827
Signed-off-by: Jacob Chen <[email protected]>
  • Loading branch information
wzyy2 committed Sep 21, 2017
1 parent 1750e8d commit 5ab215e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/media/v4l2-core/videobuf2-v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5ab215e

Please sign in to comment.