hwrng: exynos - Fix runtime PM imbalance on error
authorŁukasz Stelmach <l.stelmach@samsung.com>
Wed, 5 May 2021 18:29:14 +0000 (20:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:55:50 +0000 (16:55 +0200)
commit4e8c9510b787123125707cdb37090d852f15241a
tree75863d8b294872593cb099415860deff3ae209ae
parent3c51d82d0b7862d7d246016c74b4390fb1fa1f11
hwrng: exynos - Fix runtime PM imbalance on error

[ Upstream commit 0cdbabf8bb7a6147f5adf37dbc251e92a1bbc2c7 ]

pm_runtime_resume_and_get() wraps around pm_runtime_get_sync() and
decrements the runtime PM usage counter in case the latter function
fails and keeps the counter balanced.

Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/char/hw_random/exynos-trng.c