projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d0214c
)
dmaengine: shdma: Fix runtime PM imbalance on error
author
Yongzhi Liu
<lyz_cs@pku.edu.cn>
Sun, 16 Jan 2022 05:34:56 +0000
(21:34 -0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Tue, 8 Mar 2022 18:12:31 +0000
(19:12 +0100)
[ Upstream commit
455896c53d5b803733ddd84e1bf8a430644439b6
]
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>
Link:
https://lore.kernel.org/r/1642311296-87020-1-git-send-email-lyz_cs@pku.edu.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/sh/shdma-base.c
patch
|
blob
|
history
diff --git
a/drivers/dma/sh/shdma-base.c
b/drivers/dma/sh/shdma-base.c
index 7f72b3f4cd1aefd083e1c8d8017d682820091cf0..19ac95c0098f0f7a245c6657ee4af07dd9996f97 100644
(file)
--- 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);