From: Frank Li <Frank.li@oss.nxp.com>
To: Li Youhong <dayou5941@163.com>
Cc: Eugeniy.Paltsev@synopsys.com, vkoul@kernel.org,
Frank.Li@kernel.org, dmaengine@vger.kernel.org,
Li Youhong <liyouhong@kylinos.cn>
Subject: Re: [PATCH] dmaengine: dw-axi-dmac: fix cfgr_clk leak when core_clk enable fails
Date: Mon, 31 Aug 2026 10:07:04 -0500 [thread overview]
Message-ID: <apWYmJxYxIJWy2z1@SMW015318> (raw)
In-Reply-To: <20260831094438.2244538-1-dayou5941@163.com>
On Mon, Aug 31, 2026 at 05:44:38PM +0800, Li Youhong wrote:
> [You don't often get email from dayou5941@163.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> From: Li Youhong <liyouhong@kylinos.cn>
>
> axi_dma_resume() enables cfgr_clk then core_clk. If enabling
> core_clk fails, return without disabling cfgr_clk, leaking the
> already-enabled clock. Disable cfgr_clk on that error path.
>
> Fixes: 1fe20f1b8454 ("dmaengine: Introduce DW AXI DMAC driver")
> Signed-off-by: Li Youhong <liyouhong@kylinos.cn>
> ---
> drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> index eebed2474210..6ccb3fcfa397 100644
> --- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> @@ -1335,8 +1335,10 @@ static int axi_dma_resume(struct axi_dma_chip *chip)
> return ret;
>
> ret = clk_prepare_enable(chip->core_clk);
> - if (ret < 0)
> + if (ret < 0) {
> + clk_disable_unprepare(chip->cfgr_clk);
> return ret;
> + }
Please switch to use bulk clk API.
Frank
>
> axi_dma_enable(chip);
> axi_dma_irq_enable(chip);
> --
> 2.25.1
>
prev parent reply other threads:[~2026-08-31 15:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 9:44 [PATCH] dmaengine: dw-axi-dmac: fix cfgr_clk leak when core_clk enable fails Li Youhong
2026-08-31 9:58 ` sashiko-bot
2026-08-31 15:07 ` 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=apWYmJxYxIJWy2z1@SMW015318 \
--to=frank.li@oss.nxp.com \
--cc=Eugeniy.Paltsev@synopsys.com \
--cc=Frank.Li@kernel.org \
--cc=dayou5941@163.com \
--cc=dmaengine@vger.kernel.org \
--cc=liyouhong@kylinos.cn \
--cc=vkoul@kernel.org \
/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