[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <555a3d93-ea24-a633-2ea4-904fcd8fd8a2@nvidia.com>
Date: Fri, 5 Jun 2020 07:02:39 +0100
From: Jon Hunter <jonathanh@...dia.com>
To: Navid Emamdoost <navid.emamdoost@...il.com>,
Laxman Dewangan <ldewangan@...dia.com>,
Mark Brown <broonie@...nel.org>,
Thierry Reding <thierry.reding@...il.com>,
<linux-spi@...r.kernel.org>, <linux-tegra@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
CC: <emamd001@....edu>, <wu000273@....edu>, <kjlu@....edu>,
<smccaman@....edu>
Subject: Re: [PATCH] spi: tegra20-slink: add missing pm_runtime_put
On 02/06/2020 06:26, Navid Emamdoost wrote:
> Call to pm_runtime_get_sync increments counter even in case of
> failure leading to incorrect ref count.
> Call pm_runtime_put if pm_runtime_get_sync fails.
>
> Signed-off-by: Navid Emamdoost <navid.emamdoost@...il.com>
> ---
> drivers/spi/spi-tegra20-slink.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c
> index 7f4d932dade7..0675b36d647b 100644
> --- a/drivers/spi/spi-tegra20-slink.c
> +++ b/drivers/spi/spi-tegra20-slink.c
> @@ -1192,6 +1192,7 @@ static int tegra_slink_resume(struct device *dev)
> ret = pm_runtime_get_sync(dev);
> if (ret < 0) {
> dev_err(dev, "pm runtime failed, e = %d\n", ret);
> + pm_runtime_put(dev);
> return ret;
> }
> tegra_slink_writel(tspi, tspi->command_reg, SLINK_COMMAND);
Please squash this patch with the other 2 that are fixing the same
issues in the same driver.
Jon
--
nvpublic
Powered by blists - more mailing lists