]> git.baikalelectronics.ru Git - kernel.git/commit
[media] vb2: Fix compilation breakage when !CONFIG_BUG
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 12 Jul 2015 23:08:34 +0000 (20:08 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 10 Aug 2015 11:08:11 +0000 (08:08 -0300)
commit3809a3a01e4b67bdd2411ae072b3da79857ba89e
treefa6bbb501d8f95ea74bd2459a9fb2b7410c35a96
parent882bf3eb3aabe2b50cd04f9e24d10770690b85f2
[media] vb2: Fix compilation breakage when !CONFIG_BUG

Commit ba44e61625f7 ("[media] vb2: Don't WARN when v4l2_buffer.bytesused
is 0 for multiplanar buffers") uses the __WARN() macro which isn't
defined when CONFIG_BUG isn't set. This introduces a compilation
breakage. Fix it by using WARN_ON() instead.

The commit was also broken in that it merged v1 of the patch while a new
v2 version had been submitted, reviewed and acked. Fix it by
incorporating the changes from v1 to v2.

Fixes: ba44e61625f7 ("[media] vb2: Don't WARN when v4l2_buffer.bytesused is 0 for multiplanar buffers")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/v4l2-core/videobuf2-core.c