Skip to content

Commit b266e0d

Browse files
nxpfranklialexandrebelloni
authored andcommitted
i3c: master: Fix missing 'ret' assignment in set_speed()
Fix a probe failure in the i3c master driver that occurs when no i3c devices are connected to the bus. The issue arises in `i3c_master_bus_init()` where the `ret` value is not updated after calling `master->ops->set_speed()`. If no devices are present, `ret` remains set to `I3C_ERROR_M2`, causing the code to incorrectly proceed to `err_bus_cleanup`. Cc: [email protected] Fixes: aef79e1 ("i3c: master: support to adjust first broadcast address speed") Signed-off-by: Frank Li <[email protected]> Reviewed-by: Wolfram Sang <[email protected]> Tested-by: Wolfram Sang <[email protected]> Acked-by: Mukesh Kumar Savaliya <[email protected]> Reviewed-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 5e8c732 commit b266e0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i3c/master.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1919,7 +1919,7 @@ static int i3c_master_bus_init(struct i3c_master_controller *master)
19191919
goto err_bus_cleanup;
19201920

19211921
if (master->ops->set_speed) {
1922-
master->ops->set_speed(master, I3C_OPEN_DRAIN_NORMAL_SPEED);
1922+
ret = master->ops->set_speed(master, I3C_OPEN_DRAIN_NORMAL_SPEED);
19231923
if (ret)
19241924
goto err_bus_cleanup;
19251925
}

0 commit comments

Comments
 (0)