Skip to content

Commit

Permalink
media: videobuf2-v4l2: drop WARN_ON in vb2_warn_zero_bytesused()
Browse files Browse the repository at this point in the history
Userspace shouldn't set bytesused to 0 for output buffers.
vb2_warn_zero_bytesused() warns about this (only once!), but it also
calls WARN_ON(1), which is confusing since it is not immediately clear
that it warns about a 0 value for bytesused.

Just drop the WARN_ON as it serves no purpose.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Nov 23, 2018
1 parent d644cca commit 5e99456
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/media/common/videobuf2/videobuf2-v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ static void vb2_warn_zero_bytesused(struct vb2_buffer *vb)
return;

check_once = true;
WARN_ON(1);

pr_warn("use of bytesused == 0 is deprecated and will be removed in the future,\n");
if (vb->vb2_queue->allow_zero_bytesused)
Expand Down

0 comments on commit 5e99456

Please sign in to comment.