From: Frank Li <Frank.li@oss.nxp.com>
To: Jiawen Liu <1298662399@qq.com>
Cc: Vinod Koul <vkoul@kernel.org>, Orson Zhai <orsonzhai@gmail.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
Frank Li <Frank.Li@kernel.org>,
Chunyan Zhang <zhang.lyra@gmail.com>
Subject: Re: [PATCH] dmaengine: sprd-dma: handle runtime PM get failure
Date: Tue, 18 Aug 2026 11:38:20 -0500 [thread overview]
Message-ID: <aoSKfDed29xf-nby@SMW015318> (raw)
In-Reply-To: <tencent_72CAD47A90A208C873DD65A726C0A15FC107@qq.com>
On Tue, Aug 18, 2026 at 04:41:24PM +0400, Jiawen Liu wrote:
> From: jiawen <1298662399@qq.com>
>
> Route failed runtime-PM acquisition through its existing cleanup path.
>
> Release and disable runtime PM before continuing with the hardware
> teardown, so an unsuccessful pm_runtime_get_sync() does not leave
> runtime PM enabled.
>
> Signed-off-by: jiawen <1298662399@qq.com>
> ---
> diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
> --- a/drivers/dma/sprd-dma.c
> +++ b/drivers/dma/sprd-dma.c
> @@ -1212,7 +1212,7 @@
>
> ret = pm_runtime_get_sync(&pdev->dev);
Use cleanup
PM_RUNTIME_ACQUIRE_IF_ENABLED(&pdev->dev, pm)
ret = PM_RUNTIME_ACQUIRE_ERR(&pm)
if (ret)
...
Frank
> if (ret < 0)
> - goto err_rpm;
> + goto err_register;
>
> ret = dma_async_device_register(&sdev->dma_dev);
> if (ret < 0) {
> @@ -1234,7 +1234,6 @@
> err_register:
> pm_runtime_put_noidle(&pdev->dev);
> pm_runtime_disable(&pdev->dev);
> -err_rpm:
> sprd_dma_disable(sdev);
> return ret;
> }
>
prev parent reply other threads:[~2026-08-18 16:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 12:41 [PATCH] dmaengine: sprd-dma: handle runtime PM get failure Jiawen Liu
2026-08-18 12:51 ` sashiko-bot
2026-08-18 16:38 ` Frank Li [this message]
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=aoSKfDed29xf-nby@SMW015318 \
--to=frank.li@oss.nxp.com \
--cc=1298662399@qq.com \
--cc=Frank.Li@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=orsonzhai@gmail.com \
--cc=vkoul@kernel.org \
--cc=zhang.lyra@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox