aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/v4l2-core/videobuf2-core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
index 17f1d071739c..f8fe1d9c7b4f 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -2597,9 +2597,9 @@ static int __vb2_init_fileio(struct vb2_queue *q, int read)
2597 /* 2597 /*
2598 * Sanity check 2598 * Sanity check
2599 */ 2599 */
2600 if ((read && !(q->io_modes & VB2_READ)) || 2600 if (WARN_ON((read && !(q->io_modes & VB2_READ)) ||
2601 (!read && !(q->io_modes & VB2_WRITE))) 2601 (!read && !(q->io_modes & VB2_WRITE))))
2602 BUG(); 2602 return -EINVAL;
2603 2603
2604 /* 2604 /*
2605 * Check if device supports mapping buffers to kernel virtual space. 2605 * Check if device supports mapping buffers to kernel virtual space.