Commit f0775157 authored by Adrian Hunter's avatar Adrian Hunter Committed by Alexandre Belloni
Browse files

i3c: master: Update hot-join flag only on success



To prevent inconsistent state when an error occurs, ensure the hot-join
flag is updated only when enabling or disabling hot-join succeeds.

Fixes: 317bacf9 ("i3c: master: add enable(disable) hot join in sys entry")
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Reviewed-by: default avatarFrank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260113072702.16268-4-adrian.hunter@intel.com


Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 8bb96575
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -618,6 +618,7 @@ static int i3c_set_hotjoin(struct i3c_master_controller *master, bool enable)
	else
		ret = master->ops->disable_hotjoin(master);

	if (!ret)
		master->hotjoin = enable;

	i3c_bus_normaluse_unlock(&master->bus);