Re: [PATCH v2 RESEND] dmaengine: mediatek: hsdma: fix runtime PM leak on init failure

From
Vinod Koul <vkoul@kernel.org>
Date
2026-09-03 17:04:53
Also in
dmaengine, linux-mediatek, lkml
Reply to
Myeonghun Pak, 2026-08-04
On Wed, 05 Aug 2026 00:39:24 +0900, Myeonghun Pak wrote:
mtk_hsdma_hw_init() enables runtime PM and gets a runtime PM reference
before enabling the HSDMA clock. It currently ignores failures from
pm_runtime_get_sync(); if runtime resume fails, the usage count remains
held. If clk_prepare_enable() then fails, the usage count remains held.

Use devm_pm_runtime_enable() to manage runtime PM enablement, and use
pm_runtime_resume_and_get() so resume failures do not leak the usage count.
If clk_prepare_enable() fails after a successful runtime resume, drop the
runtime PM reference before returning.

[...]
Applied, thanks!

[1/1] dmaengine: mediatek: hsdma: fix runtime PM leak on init failure
      commit: b616eb4ef1e9358296a88a2fa7230dcfac52b53e

Best regards,
-- 
~Vinod


Thread (5 messages) 5 messages, 3 authors, last reply 2026-09-03
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help