From: Dinesh Maniyam <dinesh.mani...@altera.com>

Picked linux i3c driver upstraming patch to fix the issue to
probe for i3c controller without slave device attached.
With this fix, the ret check will be on command error and will success
without slave device attached.

Signed-off-by: Dinesh Maniyam <dinesh.mani...@altera.com>
---
 drivers/i3c/master.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index a4f2de1302d..6df6410bb12 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -454,6 +454,9 @@ static int i3c_master_rstdaa_locked(struct 
i3c_master_controller *master,
 
        i3c_ccc_cmd_dest_cleanup(&dest);
 
+       if (ret)
+               ret = cmd.err;
+
        return ret;
 }
 
@@ -509,6 +512,9 @@ static int i3c_master_enec_disec_locked(struct 
i3c_master_controller *master,
        ret = i3c_master_send_ccc_cmd_locked(master, &cmd);
        i3c_ccc_cmd_dest_cleanup(&dest);
 
+       if (ret)
+               ret = cmd.err;
+
        return ret;
 }
 
-- 
2.26.2

Reply via email to