Re: [PATCH] i2c: i2c-rzv2m: fix runtime PM cleanup

Andi Shyti <[email protected]>
Newsgroups org.kernel.vger.linux-i2c,org.kernel.vger.linux-kernel,org.kernel.vger.linux-renesas-soc
Message-ID <[email protected]>
Hi Jiawen,

On Tue, Aug 18, 2026 at 05:15:01PM +0400, Jiawen Liu wrote:
> Update rzv2m_i2c_probe() for the confirmed driver lifecycle defect.
> 
> Keep the change limited to the concrete operation shown in the final
> patch.
> 
> Signed-off-by: jiawen <[email protected]>
> ---
> diff --git a/drivers/i2c/busses/i2c-rzv2m.c b/drivers/i2c/busses/i2c-rzv2m.c
> --- a/drivers/i2c/busses/i2c-rzv2m.c
> +++ b/drivers/i2c/busses/i2c-rzv2m.c
> @@ -461,7 +461,12 @@
>  
>  	pm_runtime_enable(dev);
>  
> -	pm_runtime_get_sync(dev);
> +	ret = pm_runtime_get_sync(dev);
> +	if (ret < 0) {
> +		pm_runtime_put_noidle(dev);
> +		return ret;
> +	}

Please, consider using managed resources.

Thanks,
Andi
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.