* [PATCH] dmaengine: shdma: Fix runtime PM imbalance on error
@ 2022-01-16 7:29 刘永志
0 siblings, 0 replies; 2+ messages in thread
From: 刘永志 @ 2022-01-16 7:29 UTC (permalink / raw)
To: laurent.pinchart; +Cc: dmaengine, linux-kernel
pm_runtime_get_() increments the runtime PM usage counter even
when it returns an error code, thus a matching decrement is needed on
the error handling path to keep the counter balanced.
Signed-off-by: Yongzhi Liu <lyz_cs@pku.edu.cn>
---
drivers/dma/sh/shdma-base.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/sh/shdma-base.c b/drivers/dma/sh/shdma-base.c
index 158e5e7..b26ed69 100644
--- a/drivers/dma/sh/shdma-base.c
+++ b/drivers/dma/sh/shdma-base.c
@@ -115,8 +115,10 @@ static dma_cookie_t shdma_tx_submit(struct dma_async_tx_descriptor *tx)
ret = pm_runtime_get(schan->dev);
spin_unlock_irq(&schan->chan_lock);
- if (ret < 0)
+ if (ret < 0) {
dev_err(schan->dev, "%s(): GET = %d\n", __func__, ret);
+ pm_runtime_put(schan->dev);
+ }
pm_runtime_barrier(schan->dev);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dmaengine: shdma: Fix runtime PM imbalance on error
[not found] <1642311296-87020-1-git-send-email-lyz_cs@pku.edu.cn>
@ 2022-02-15 5:35 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2022-02-15 5:35 UTC (permalink / raw)
To: Yongzhi Liu
Cc: broonie, laurent.pinchart, arnd, christophe.jaillet, dmaengine,
linux-kernel
On 15-01-22, 21:34, Yongzhi Liu wrote:
> pm_runtime_get_() increments the runtime PM usage counter even
> when it returns an error code, thus a matching decrement is needed on
> the error handling path to keep the counter balanced.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-15 5:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1642311296-87020-1-git-send-email-lyz_cs@pku.edu.cn>
2022-02-15 5:35 ` [PATCH] dmaengine: shdma: Fix runtime PM imbalance on error Vinod Koul
2022-01-16 7:29 刘永志
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox