]> git.baikalelectronics.ru Git - kernel.git/commit
soc: mediatek: mtk-svs: Use pm_runtime_resume_and_get() in svs_init01()
authorShang XiaoJing <shangxiaojing@huawei.com>
Wed, 11 Jan 2023 07:45:18 +0000 (15:45 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 12:55:18 +0000 (13:55 +0100)
commit727cf75b3c6cff15a46f94dd5d38ad10bb8b6dcf
treefe76b035bbdcbae5a8a5966dd7d2ec081d37dfbe
parent74d861807b56791381586607c4f4e8042000f062
soc: mediatek: mtk-svs: Use pm_runtime_resume_and_get() in svs_init01()

[ Upstream commit e30f3ed982227781b4b2d3ae87f638cc39a1e56a ]

svs_init01() calls pm_runtime_get_sync() and added fail path as
svs_init01_finish to put usage_counter. However, pm_runtime_get_sync()
will increment usage_counter even it failed. Fix it by replacing it with
pm_runtime_resume_and_get() to keep usage counter balanced.

Fixes: 7ba1a4be26a6 ("soc: mediatek: SVS: introduce MTK SVS engine")
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Signed-off-by: Roger Lu <roger.lu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230111074528.29354-5-roger.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/soc/mediatek/mtk-svs.c