[media] vb2: Allow queuing OUTPUT buffers with zeroed 'bytesused'
[profile/ivi/kernel-x86-ivi.git] / drivers / media / v4l2-core / videobuf2-core.c
index 594c75e..de0e87f 100644 (file)
@@ -353,7 +353,9 @@ static int __verify_length(struct vb2_buffer *vb, const struct v4l2_buffer *b)
 
                        if (b->m.planes[plane].bytesused > length)
                                return -EINVAL;
-                       if (b->m.planes[plane].data_offset >=
+
+                       if (b->m.planes[plane].data_offset > 0 &&
+                           b->m.planes[plane].data_offset >=
                            b->m.planes[plane].bytesused)
                                return -EINVAL;
                }