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)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 14 May 2021 11:07:56 +0000 (19:07 +0800)
commit0cdbabf8bb7a6147f5adf37dbc251e92a1bbc2c7
treea5fb77d258334fd4db9d41214fa12dca225edd19
parentb51dcf05c1e96caccda769f3a60042d77f1a3a7d
hwrng: exynos - Fix runtime PM imbalance on error

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>
drivers/char/hw_random/exynos-trng.c