* [PATCH] dmaengine: sh: usb-dmac: Fix runtime PM imbalance on error
@ 2020-05-22 10:45 Dinghao Liu
0 siblings, 0 replies; only message in thread
From: Dinghao Liu @ 2020-05-22 10:45 UTC (permalink / raw)
To: dinghao.liu, kjlu
Cc: Dan Williams, Vinod Koul, Geert Uytterhoeven, Stephen Boyd,
Baolin Wang, dmaengine, linux-kernel
pm_runtime_get_sync() increments the runtime PM usage counter even
when it returns an error code. Thus a pairing decrement is needed on
the error handling path to keep the counter balanced.
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
---
drivers/dma/sh/usb-dmac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/sh/usb-dmac.c b/drivers/dma/sh/usb-dmac.c
index b218a013c260..1485c2fd7c85 100644
--- a/drivers/dma/sh/usb-dmac.c
+++ b/drivers/dma/sh/usb-dmac.c
@@ -853,8 +853,8 @@ static int usb_dmac_probe(struct platform_device *pdev)
error:
of_dma_controller_free(pdev->dev.of_node);
- pm_runtime_put(&pdev->dev);
error_pm:
+ pm_runtime_put(&pdev->dev);
pm_runtime_disable(&pdev->dev);
return ret;
}
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-05-22 10:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-22 10:45 [PATCH] dmaengine: sh: usb-dmac: Fix runtime PM imbalance on error Dinghao Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).