HSI: Fix PM usage counter unbalance in ssi_hw_init
authorZhang Qilong <zhangqilong3@huawei.com>
Mon, 23 Nov 2020 10:18:27 +0000 (18:18 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:37:52 +0000 (11:37 +0100)
commit7c650a997df3703501b7f6d9db5b3a358c3023f9
treed95226432f4862831d952853229d7539c7931011
parent54b4e5df958c6ec1cb4afe502e045369ab5557f6
HSI: Fix PM usage counter unbalance in ssi_hw_init

[ Upstream commit aa57e77b3d28f0df07149d88c47bc0f3aa77330b ]

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

Fixes: b209e047bc743 ("HSI: Introduce OMAP SSI driver")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hsi/controllers/omap_ssi_core.c