Re: [PATCH 5/5] i3c: master: adi: Return xfer->ret at send CCC

From: Adrian Hunter

Date: Tue Mar 10 2026 - 15:15:50 EST


On 08/03/2026 18:47, Jorge Marques wrote:
> Return the xfer-> ret error code at adi_i3c_master_send_ccc_cmd to
> propagate the adi_i3c_master_end_xfer_locked value. In particular, if
> any of the Mx values are present in the sent commands, returns -EIO.

Isn't this also a bug fix. I suggest a fixes tag and
better commit message e.g.

i3c: master: adi: Fix missing error propagation for CCC commands

adi_i3c_master_send_ccc_cmd() always returned 0, ignoring the transfer
result populated in the completion path. As a consequence, CCC command
errors - such as those reported by adi_i3c_master_end_xfer_locked() - were
silently dropped.

Fix this by returning xfer->ret so that callers correctly receive any
transfer error codes.

By the way, I don't see an error code being set in the timeout case?

>
> Signed-off-by: Jorge Marques <jorge.marques@xxxxxxxxxx>
> ---
> drivers/i3c/master/adi-i3c-master.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i3c/master/adi-i3c-master.c b/drivers/i3c/master/adi-i3c-master.c
> index fb9a48830446..047081c9f064 100644
> --- a/drivers/i3c/master/adi-i3c-master.c
> +++ b/drivers/i3c/master/adi-i3c-master.c
> @@ -361,7 +361,7 @@ static int adi_i3c_master_send_ccc_cmd(struct i3c_master_controller *m,
>
> cmd->err = adi_i3c_cmd_get_err(&xfer->cmds[0]);
>
> - return 0;
> + return xfer->ret;
> }
>
> static int adi_i3c_master_i3c_xfers(struct i3c_dev_desc *dev,
>