All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hwrng: exynos - fix runtime pm imbalance on error
@ 2020-05-20 13:19 ` Dinghao Liu
  0 siblings, 0 replies; 6+ messages in thread
From: Dinghao Liu @ 2020-05-20 13:19 UTC (permalink / raw)
  To: dinghao.liu, kjlu
  Cc: Łukasz Stelmach, Matt Mackall, Herbert Xu, Arnd Bergmann,
	Greg Kroah-Hartman, Kukjin Kim, Krzysztof Kozlowski,
	linux-samsung-soc, linux-crypto, linux-arm-kernel, linux-kernel

pm_runtime_get_sync() increments the runtime PM usage counter even
the call 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/char/hw_random/exynos-trng.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/char/hw_random/exynos-trng.c b/drivers/char/hw_random/exynos-trng.c
index 8e1fe3f8dd2d..133e017db577 100644
--- a/drivers/char/hw_random/exynos-trng.c
+++ b/drivers/char/hw_random/exynos-trng.c
@@ -165,9 +165,8 @@ static int exynos_trng_probe(struct platform_device *pdev)
 	clk_disable_unprepare(trng->clk);
 
 err_clock:
-	pm_runtime_put_sync(&pdev->dev);
-
 err_pm_get:
+	pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
 
 	return ret;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread
[parent not found: <CGME20210422101724eucas1p13e2f002b63fe94ef2aa5268383f3a207@eucas1p1.samsung.com>]

end of thread, other threads:[~2021-04-22 10:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-20 13:19 [PATCH] hwrng: exynos - fix runtime pm imbalance on error Dinghao Liu
2020-05-20 13:19 ` Dinghao Liu
     [not found] ` <CGME20200521135309eucas1p1c0734570f04660c8b60ea12531f53e60@eucas1p1.samsung.com>
2020-05-21 13:52   ` Lukasz Stelmach
2020-05-21 13:52     ` Lukasz Stelmach
     [not found] <CGME20210422101724eucas1p13e2f002b63fe94ef2aa5268383f3a207@eucas1p1.samsung.com>
2021-04-22 10:17 ` [PATCH] hwrng: exynos - Fix runtime PM " Łukasz Stelmach
2021-04-22 10:17   ` Łukasz Stelmach

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.