diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-02-24 15:52:04 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-04-16 18:47:20 -0300 |
commit | 57394b72ef2b6dcf335999a7aebe69eb52142884 (patch) | |
tree | b2334a2e7554342b7210e1045bb692ad1f20276a /drivers/media/v4l2-core | |
parent | e35e41b57624b9a8c0014420cdfb24454e4773c5 (diff) |
[media] vb2: simplify a confusing condition
q->start_streaming_called is always true, so the WARN_ON check against
it being false can be dropped.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/v4l2-core')
-rw-r--r-- | drivers/media/v4l2-core/videobuf2-core.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c index 2eef5ef93e9..60fbb17cc91 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c @@ -1159,9 +1159,8 @@ void vb2_buffer_done(struct vb2_buffer *vb, enum vb2_buffer_state state) if (!q->start_streaming_called) { if (WARN_ON(state != VB2_BUF_STATE_QUEUED)) state = VB2_BUF_STATE_QUEUED; - } else if (!WARN_ON(!q->start_streaming_called)) { - if (WARN_ON(state != VB2_BUF_STATE_DONE && - state != VB2_BUF_STATE_ERROR)) + } else if (WARN_ON(state != VB2_BUF_STATE_DONE && + state != VB2_BUF_STATE_ERROR)) { state = VB2_BUF_STATE_ERROR; } |