From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-renesas-soc@vger.kernel.org,
Zhang Shurong <zhang_shurong@foxmail.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Frank Li <Frank.Li@nxp.com>, Vinod Koul <vkoul@kernel.org>,
Frank Li <Frank.Li@kernel.org>,
Magnus Damm <magnus.damm@gmail.com>,
dmaengine@vger.kernel.org
Subject: Re: [PATCH 1/3] dmaengine: rcar-dmac: Fix PM usage counter imbalance
Date: Thu, 17 Sep 2026 10:17:45 +0300 [thread overview]
Message-ID: <20260917071745.GA4019@killaraus.ideasonboard.com> (raw)
In-Reply-To: <20260917071208.36888-2-wsa+renesas@sang-engineering.com>
On Thu, Sep 17, 2026 at 09:12:06AM +0200, Wolfram Sang wrote:
> From: Zhang Shurong <zhang_shurong@foxmail.com>
>
> pm_runtime_get_sync will increment pm usage counter even it failed.
> Forgetting to putting operation will result in reference leak here. We
> fix it by replacing it with pm_runtime_resume_and_get to keep usage
> counter balanced.
>
> Fixes: 87244fe5abdf ("dmaengine: rcar-dmac: Add Renesas R-Car Gen2 DMA Controller (DMAC) driver")
> Signed-off-by: Zhang Shurong <zhang_shurong@foxmail.com>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
> drivers/dma/sh/rcar-dmac.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c
> index 3ad8aba5dcd4..5b54f1c4ce15 100644
> --- a/drivers/dma/sh/rcar-dmac.c
> +++ b/drivers/dma/sh/rcar-dmac.c
> @@ -1070,7 +1070,7 @@ static int rcar_dmac_alloc_chan_resources(struct dma_chan *chan)
> if (ret < 0)
> return -ENOMEM;
>
> - return pm_runtime_get_sync(chan->device->dev);
> + return pm_runtime_resume_and_get(chan->device->dev);
> }
>
> static void rcar_dmac_free_chan_resources(struct dma_chan *chan)
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2026-09-17 7:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 7:12 [PATCH 0/3] dmaengine: rcar-dmac: collection of small missed fixes Wolfram Sang
2026-09-17 7:12 ` [PATCH 1/3] dmaengine: rcar-dmac: Fix PM usage counter imbalance Wolfram Sang
2026-09-17 7:17 ` Laurent Pinchart [this message]
2026-09-17 7:12 ` [PATCH 2/3] dmaengine: rcar-dmac: Add missing dma_descriptor_unmap() Wolfram Sang
2026-09-17 7:25 ` sashiko-bot
2026-09-17 7:38 ` Laurent Pinchart
2026-09-17 8:23 ` Wolfram Sang
2026-09-17 16:39 ` Frank Li
2026-09-18 13:07 ` Koichiro Den
2026-09-27 12:43 ` Wolfram Sang
2026-09-27 13:11 ` Wolfram Sang
2026-09-29 4:13 ` Koichiro Den
2026-09-27 12:38 ` Wolfram Sang
2026-09-17 7:12 ` [PATCH 3/3] dmaengine: rcar-dmac: Remove redundant dev_err()/dev_err_probe() Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260917071745.GA4019@killaraus.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=Frank.Li@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=dmaengine@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=vkoul@kernel.org \
--cc=wsa+renesas@sang-engineering.com \
--cc=zhang_shurong@foxmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.