Skip to contentSkip to conversation

media: intel/ipu6: fix the buffer flags caused by wrong parentheses

PATCH New [email protected] 1 participant 1 message May 27, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: intel/ipu6: fix the buffer flags caused by wrong parentheses

From: Bingbu Cao <[email protected]>

The buffer flags is set by wrong due to wrong parentheses, the FL_INCOMING flag is never taken an account.
Fix it by wrapping the ternary conditional operation with parentheses.

Fixes 3c1dfb5a69cf ("media: intel/ipu6: input system video nodes and buffer queues")
---
 drivers/media/pci/intel/ipu6/ipu6-isys-queue.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/media/pci/intel/ipu6/ipu6-isys-queue.c +3 -3
index 40a8ebfcfce2..4bd4e324abc9 100644
@@ -301,10 +301,10 @@ static int ipu6_isys_stream_start(struct ipu6_isys_video *av,
 out_requeue:
 	if (bl && bl->nbufs)
 		ipu6_isys_buffer_list_queue(bl,
-					    (IPU6_ISYS_BUFFER_LIST_FL_INCOMING |
-					     error) ?
+					    IPU6_ISYS_BUFFER_LIST_FL_INCOMING |
+					    (error ?
 					    IPU6_ISYS_BUFFER_LIST_FL_SET_STATE :
-					    0, error ? VB2_BUF_STATE_ERROR :
+					     0), error ? VB2_BUF_STATE_ERROR :
 					    VB2_BUF_STATE_QUEUED);
 	flush_firmware_streamon_fail(stream);
 
Signature · 1 line
2.34.1