Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 57394b72 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarHans Verkuil <hans.verkuil@cisco.com>
Acked-by: default avatarPawel Osciak <pawel@osciak.com>
Acked-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent e35e41b5
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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;
	}