Commit e4d25816 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] vb2: replace BUG by WARN_ON

No need to oops for this, WARN_ON is good enough.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Acked-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent fb64dca8
...@@ -2597,9 +2597,9 @@ static int __vb2_init_fileio(struct vb2_queue *q, int read) ...@@ -2597,9 +2597,9 @@ static int __vb2_init_fileio(struct vb2_queue *q, int read)
/* /*
* Sanity check * Sanity check
*/ */
if ((read && !(q->io_modes & VB2_READ)) || if (WARN_ON((read && !(q->io_modes & VB2_READ)) ||
(!read && !(q->io_modes & VB2_WRITE))) (!read && !(q->io_modes & VB2_WRITE))))
BUG(); return -EINVAL;
/* /*
* Check if device supports mapping buffers to kernel virtual space. * Check if device supports mapping buffers to kernel virtual space.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment