diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2018-11-19 18:33:44 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-23 16:35:17 +0300 |
commit | 8d6df5097c0005320ab6f3cd8dda2ef31db6c6d1 (patch) | |
tree | 97cb037d4fd573dc97e2273894444230aeff6435 | |
parent | 4cf6ad0bf823a1acac199a976719278b7e30892d (diff) | |
download | linux-8d6df5097c0005320ab6f3cd8dda2ef31db6c6d1.tar.xz |
media: videobuf2-v4l2: drop WARN_ON in vb2_warn_zero_bytesused()
commit 5e99456c20f712dcc13d9f6ca4278937d5367355 upstream.
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>
Cc: Matthias Maennich <maennich@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/media/v4l2-core/videobuf2-v4l2.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/media/v4l2-core/videobuf2-v4l2.c b/drivers/media/v4l2-core/videobuf2-v4l2.c index 0c0669976bdc..69ca8debb711 100644 --- a/drivers/media/v4l2-core/videobuf2-v4l2.c +++ b/drivers/media/v4l2-core/videobuf2-v4l2.c @@ -145,7 +145,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) |