From: Hans Verkuil <hans.verk...@cisco.com>

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.verk...@cisco.com>
Acked-by: Pawel Osciak <pa...@osciak.com>
---
 drivers/media/v4l2-core/videobuf2-core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/v4l2-core/videobuf2-core.c 
b/drivers/media/v4l2-core/videobuf2-core.c
index c662ad9..89147d2 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -1094,9 +1094,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;
        }
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to