[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAG3jFys93VO6WhqkntpNuFGCdKNedz3HLpJEJJa=jVPb+SU+uw@mail.gmail.com>
Date: Thu, 27 May 2021 13:57:12 +0200
From: Robert Foss <robert.foss@...aro.org>
To: Zou Wei <zou_wei@...wei.com>
Cc: Andrzej Hajda <a.hajda@...sung.com>,
Neil Armstrong <narmstrong@...libre.com>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Jonas Karlman <jonas@...boo.se>,
Jernej Skrabec <jernej.skrabec@...il.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
dri-devel <dri-devel@...ts.freedesktop.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] drm/bridge: cdns: Fix PM reference leak in cdns_dsi_transfer()
Reviewed & pushed to drm-misc-next.
On Mon, 24 May 2021 at 09:02, Zou Wei <zou_wei@...wei.com> wrote:
>
> pm_runtime_get_sync will increment pm usage counter even it failed.
> Forgetting to putting operation will result in reference leak here.
> Fix it by replacing it with pm_runtime_resume_and_get to keep usage
> counter balanced.
>
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Zou Wei <zou_wei@...wei.com>
> ---
> drivers/gpu/drm/bridge/cdns-dsi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/cdns-dsi.c b/drivers/gpu/drm/bridge/cdns-dsi.c
> index 76373e3..b31281f 100644
> --- a/drivers/gpu/drm/bridge/cdns-dsi.c
> +++ b/drivers/gpu/drm/bridge/cdns-dsi.c
> @@ -1028,7 +1028,7 @@ static ssize_t cdns_dsi_transfer(struct mipi_dsi_host *host,
> struct mipi_dsi_packet packet;
> int ret, i, tx_len, rx_len;
>
> - ret = pm_runtime_get_sync(host->dev);
> + ret = pm_runtime_resume_and_get(host->dev);
> if (ret < 0)
> return ret;
>
> --
> 2.6.2
>
Powered by blists - more mailing lists