]> git.baikalelectronics.ru Git - kernel.git/commit
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:53:11 +0000 (16:53 +0200)
commit78a77b926f1d39333b272825eacc67bc5ad14763
tree3c0477aaf266170ab344cef832577c68511b2363
parentf82a2f1a2ea6e80646e76904254bbb5f764365b4
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