crypto: sa2ul - Fix PM reference leak in sa_ul_probe()
authorShixin Liu <liushixin2@huawei.com>
Thu, 8 Apr 2021 07:18:37 +0000 (15:18 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 May 2021 12:47:21 +0000 (14:47 +0200)
commit92894b185321fd24e0b0144ac0f4cfcde49320a2
tree7a6b3906f02e02dedde1e92b206e9431c6d31dd6
parent4e7ae0cfaca9ba57b6b10d4fe4d4bcefd9935db8
crypto: sa2ul - Fix PM reference leak in sa_ul_probe()

[ Upstream commit 13343badae093977295341d5a050f51ef128821c ]

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>
drivers/crypto/sa2ul.c