Skip to content

Commit 0b73da9

Browse files
gastmaieralexandrebelloni
authored andcommitted
i3c: master: adi: Fix error propagation for CCCs
adi_i3c_master_send_ccc_cmd() always returned 0, ignoring the transfer result populated in the completion path. As a consequence, CCC command errors were silently dropped, including the default -ETIMEDOUT and later overwritten by adi_i3c_master_end_xfer_locked(). Fix this by returning xfer->ret so that callers correctly receive any transfer error codes. Fixes: a79ac2c ("i3c: master: Add driver for Analog Devices I3C Controller IP") Reviewed-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Jorge Marques <jorge.marques@analog.com> Link: https://patch.msgid.link/20260323-ad4062-positive-error-fix-v3-5-30bdc68004be@analog.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent ef8b522 commit 0b73da9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/i3c/master/adi-i3c-master.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ static int adi_i3c_master_send_ccc_cmd(struct i3c_master_controller *m,
361361

362362
cmd->err = adi_i3c_cmd_get_err(&xfer->cmds[0]);
363363

364-
return 0;
364+
return xfer->ret;
365365
}
366366

367367
static int adi_i3c_master_i3c_xfers(struct i3c_dev_desc *dev,

0 commit comments

Comments
 (0)