]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
i3c: master: adi: Fix error propagation for CCCs
authorJorge Marques <jorge.marques@analog.com>
Mon, 23 Mar 2026 16:11:33 +0000 (17:11 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Sun, 12 Apr 2026 14:54:37 +0000 (16:54 +0200)
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: a79ac2cdc91d ("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>
drivers/i3c/master/adi-i3c-master.c

index fb9a488304469107690fb4febf470e43cc876bbf..047081c9f064396b786004ec9a7a05cc1ca4c11b 100644 (file)
@@ -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,