Messages in this thread Patch in this message | | | From | Dinghao Liu <> | Subject | [PATCH] hwrng: exynos - fix runtime pm imbalance on error | Date | Wed, 20 May 2020 21:19:10 +0800 |
| |
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
| |