Re: [PATCH v2 04/24] media: iris: Fix port streaming handling

From: Bryan O'Donoghue
Date: Tue Aug 19 2025 - 09:41:13 EST


On 18/08/2025 10:45, Dikshita Agarwal wrote:


On 8/16/2025 4:10 PM, Bryan O'Donoghue wrote:
On 13/08/2025 10:37, Dikshita Agarwal wrote:
+    if (!ret)

I think you should have a consistent error pattern

if (ret)
    goto error;

Its done to avoid duplication of code, otherwise it would look like

if (inst->state == IRIS_INST_STREAMING)
ret = iris_queue_internal_deferred_buffers(inst, BUF_DPB);
if (ret)
goto error;

ret = iris_queue_deferred_buffers(inst, buf_type);
if (ret)
goto error;

and more duplication when encoder is added.

Understood, IMO the pattern above is clearer and easier to read.

Up to you if you want to change it though.

---
bod