Re: [PATCH 2/3] i3c: master: Add missing runtime PM get in dev_nack_retry_count_store()

Frank Li <[email protected]>
Newsgroups org.infradead.lists.linux-i3c,org.kernel.vger.linux-kernel
Message-ID <ajGAQL4yzFkD-E1c@lizhi-Precision-Tower-5810>
On Tue, Jun 16, 2026 at 02:37:51PM +0300, Adrian Hunter wrote:
> Ensure the device is runtime resumed while updating the retry
> configuration to avoid accessing the controller while suspended.
>
> Call i3c_master_rpm_get() before accessing the controller in
> dev_nack_retry_count_store() and release it with
> i3c_master_rpm_put() afterwards.
>
> Fixes: 990c149c61ee4 ("i3c: master: Introduce optional Runtime PM support")
> Signed-off-by: Adrian Hunter <[email protected]>
> ---

Reviewed-by: Frank Li <[email protected]>

>  drivers/i3c/master.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
> index 66cf5d3bd987..903ac01ab413 100644
> --- a/drivers/i3c/master.c
> +++ b/drivers/i3c/master.c
> @@ -767,12 +767,18 @@ static ssize_t dev_nack_retry_count_store(struct device *dev,
>  	if (ret)
>  		return ret;
>
> +	ret = i3c_master_rpm_get(master);
> +	if (ret)
> +		return ret;
> +
>  	i3c_bus_maintenance_lock(i3cbus);
>  	ret = master->ops->set_dev_nack_retry(master, val);
>  	if (!ret)
>  		master->dev_nack_retry_count = val;
>  	i3c_bus_maintenance_unlock(i3cbus);
>
> +	i3c_master_rpm_put(master);
> +
>  	return ret ?: count;
>  }
>
> --
> 2.51.0
>

-- 
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.