diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-02-24 13:52:04 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-04-16 17:47:20 -0400 |
commit | 57394b72ef2b6dcf335999a7aebe69eb52142884 (patch) | |
tree | b2334a2e7554342b7210e1045bb692ad1f20276a | |
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>
-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 2eef5ef93e93..60fbb17cc913 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) | |||
1159 | if (!q->start_streaming_called) { | 1159 | if (!q->start_streaming_called) { |
1160 | if (WARN_ON(state != VB2_BUF_STATE_QUEUED)) | 1160 | if (WARN_ON(state != VB2_BUF_STATE_QUEUED)) |
1161 | state = VB2_BUF_STATE_QUEUED; | 1161 | state = VB2_BUF_STATE_QUEUED; |
1162 | } else if (!WARN_ON(!q->start_streaming_called)) { | 1162 | } else if (WARN_ON(state != VB2_BUF_STATE_DONE && |
1163 | if (WARN_ON(state != VB2_BUF_STATE_DONE && | 1163 | state != VB2_BUF_STATE_ERROR)) { |
1164 | state != VB2_BUF_STATE_ERROR)) | ||
1165 | state = VB2_BUF_STATE_ERROR; | 1164 | state = VB2_BUF_STATE_ERROR; |
1166 | } | 1165 | } |
1167 | 1166 | ||