[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e2b5dc55-e084-c4e5-4eb0-749e2922a602@ti.com>
Date: Wed, 7 Apr 2021 11:49:03 +0530
From: Vignesh Raghavendra <vigneshr@...com>
To: Dinghao Liu <dinghao.liu@....edu.cn>, <kjlu@....edu>
CC: Tony Lindgren <tony@...mide.com>,
Aaro Koskinen <aaro.koskinen@....fi>,
<linux-omap@...r.kernel.org>, <linux-i2c@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] i2c: omap: Fix rumtime PM imbalance on error
On 4/7/21 9:00 AM, Dinghao Liu wrote:
> pm_runtime_get_sync() will increase the rumtime PM counter
> even it returns an error. Thus a pairing decrement is needed
> to prevent refcount leak. Fix this by replacing this API with
> pm_runtime_resume_and_get(), which will not change the runtime
> PM counter on error.
>
> Signed-off-by: Dinghao Liu <dinghao.liu@....edu.cn>
> ---
Do we need a Fixes: tag to enable stable backports?
Reviewed-by: Vignesh Raghavendra <vigneshr@...com>
> drivers/i2c/busses/i2c-omap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index 12ac4212aded..c9ee0875a79d 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -1404,7 +1404,7 @@ omap_i2c_probe(struct platform_device *pdev)
> pm_runtime_set_autosuspend_delay(omap->dev, OMAP_I2C_PM_TIMEOUT);
> pm_runtime_use_autosuspend(omap->dev);
>
> - r = pm_runtime_get_sync(omap->dev);
> + r = pm_runtime_resume_and_get(omap->dev);
> if (r < 0)
> goto err_free_mem;
>
>
Powered by blists - more mailing lists