]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
media: intel/ipu6: fix the buffer flags caused by wrong parentheses
authorBingbu Cao <bingbu.cao@intel.com>
Mon, 27 May 2024 10:48:57 +0000 (18:48 +0800)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Tue, 28 May 2024 06:00:14 +0000 (08:00 +0200)
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")
Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/pci/intel/ipu6/ipu6-isys-queue.c

index 40a8ebfcfce2d24bfc2d4afb6ff9004b66f643c8..4bd4e324abc9f66bb08672bb0b0b8944e9b04c26 100644 (file)
@@ -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);