mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-11 15:14:03 +08:00
[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>
This commit is contained in:
parent
e35e41b576
commit
57394b72ef
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user