summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2026-01-13 10:26:44 +0300
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2026-01-14 19:21:09 +0300
commitf0775157b9f9a28ae3eabc8d05b0bc52e8056c80 (patch)
treef61594ebe20db694f6a9b22f72b8fbd09399f610
parent8bb96575883d3b201ce37046b3903ea1d2d50bbc (diff)
downloadlinux-f0775157b9f9a28ae3eabc8d05b0bc52e8056c80.tar.xz
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: 317bacf960a48 ("i3c: master: add enable(disable) hot join in sys entry") Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20260113072702.16268-4-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r--drivers/i3c/master.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 3bc8b4abf8af..d684a6b79960 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -618,7 +618,8 @@ static int i3c_set_hotjoin(struct i3c_master_controller *master, bool enable)
else
ret = master->ops->disable_hotjoin(master);
- master->hotjoin = enable;
+ if (!ret)
+ master->hotjoin = enable;
i3c_bus_normaluse_unlock(&master->bus);