1 From 5e99456c20f712dcc13d9f6ca4278937d5367355 Mon Sep 17 00:00:00 2001
2 From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
3 Date: Mon, 19 Nov 2018 10:33:44 -0500
4 Subject: media: videobuf2-v4l2: drop WARN_ON in vb2_warn_zero_bytesused()
6 From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
8 commit 5e99456c20f712dcc13d9f6ca4278937d5367355 upstream.
10 Userspace shouldn't set bytesused to 0 for output buffers.
11 vb2_warn_zero_bytesused() warns about this (only once!), but it also
12 calls WARN_ON(1), which is confusing since it is not immediately clear
13 that it warns about a 0 value for bytesused.
15 Just drop the WARN_ON as it serves no purpose.
17 Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
18 Acked-by: Ezequiel Garcia <ezequiel@collabora.com>
19 Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
20 Cc: Matthias Maennich <maennich@google.com>
21 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24 drivers/media/common/videobuf2/videobuf2-v4l2.c | 1 -
25 1 file changed, 1 deletion(-)
27 --- a/drivers/media/common/videobuf2/videobuf2-v4l2.c
28 +++ b/drivers/media/common/videobuf2/videobuf2-v4l2.c
29 @@ -145,7 +145,6 @@ static void vb2_warn_zero_bytesused(stru
35 pr_warn("use of bytesused == 0 is deprecated and will be removed in the future,\n");
36 if (vb->vb2_queue->allow_zero_bytesused)