]> git.baikalelectronics.ru Git - kernel.git/commit
media: videobuf2-v4l2: drop WARN_ON in vb2_warn_zero_bytesused()
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 19 Nov 2018 15:33:44 +0000 (10:33 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 23 Nov 2018 11:42:15 +0000 (06:42 -0500)
commit8adeb40e29e64004d304612092e090de4861d297
treeb7df04e1962020806d52a64b14989139cb542110
parent17e28b9aee85059f0801d53d6c7b2dabee7e724f
media: videobuf2-v4l2: drop WARN_ON in vb2_warn_zero_bytesused()

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>
drivers/media/common/videobuf2/videobuf2-v4l2.c