]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - queue-4.14/media-videobuf2-v4l2-drop-warn_on-in-vb2_warn_zero_bytesused.patch
drop some duplicated patches that somehow got merged.
[thirdparty/kernel/stable-queue.git] / queue-4.14 / media-videobuf2-v4l2-drop-warn_on-in-vb2_warn_zero_bytesused.patch
CommitLineData
15bfdeb4
GKH
1From 5e99456c20f712dcc13d9f6ca4278937d5367355 Mon Sep 17 00:00:00 2001
2From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
3Date: Mon, 19 Nov 2018 10:33:44 -0500
4Subject: media: videobuf2-v4l2: drop WARN_ON in vb2_warn_zero_bytesused()
5
6From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
7
8commit 5e99456c20f712dcc13d9f6ca4278937d5367355 upstream.
9
10Userspace shouldn't set bytesused to 0 for output buffers.
11vb2_warn_zero_bytesused() warns about this (only once!), but it also
12calls WARN_ON(1), which is confusing since it is not immediately clear
13that it warns about a 0 value for bytesused.
14
15Just drop the WARN_ON as it serves no purpose.
16
17Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
18Acked-by: Ezequiel Garcia <ezequiel@collabora.com>
19Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
20Cc: Matthias Maennich <maennich@google.com>
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22
7a531351
GKH
23---
24 drivers/media/v4l2-core/videobuf2-v4l2.c | 1 -
25 1 file changed, 1 deletion(-)
26
27--- a/drivers/media/v4l2-core/videobuf2-v4l2.c
28+++ b/drivers/media/v4l2-core/videobuf2-v4l2.c
29@@ -145,7 +145,6 @@ static void vb2_warn_zero_bytesused(stru
15bfdeb4
GKH
30 return;
31
32 check_once = true;
33- WARN_ON(1);
34
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)