[PATCH V2 03/20] i3c: master: Update hot-join flag only on success
Frank Li
Frank.li at nxp.com
Thu Jan 8 06:52:33 PST 2026
On Thu, Jan 08, 2026 at 10:05:41AM +0200, Adrian Hunter wrote:
> 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 at intel.com>
> ---
Reviewed-by: Frank Li <Frank.Li at nxp.com>
>
>
> Changes in V2:
>
> Add Fixes tag
>
>
> drivers/i3c/master.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
> index 7f606c871648..e6384bffd4ae 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);
>
> --
> 2.51.0
>
>
> --
> linux-i3c mailing list
> linux-i3c at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-i3c
More information about the linux-i3c
mailing list