crypto: sun8i-ss - Fix PM reference leak when pm_runtime_get_sync() fails

[ Upstream commit 06cd7423cf ]

pm_runtime_get_sync will increment pm usage counter even it failed.
Forgetting to putting operation will result in reference leak here.
Fix it by replacing it with pm_runtime_resume_and_get to keep usage
counter balanced.

Signed-off-by: Shixin Liu <liushixin2@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Shixin Liu 2021-04-08 15:18:32 +08:00 • committed by Greg Kroah-Hartman
commit 2264965f57
2 changed files with 2 additions and 2 deletions