drm/rockchip: lvds: fix PM usage counter unbalance in poweron
authorZhang Qilong <zhangqilong3@huawei.com>
Thu, 22 Sep 2022 13:21:07 +0000 (21:21 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:14:08 +0000 (13:14 +0100)
commitf6ed73db390319b248b91a6325da1a48ad85e0d1
treebd4e723c842769b0f4aec83e5eab087a7526a7cf
parent13fab6322b9f16406c9c6ba9b3b402b425453f96
drm/rockchip: lvds: fix PM usage counter unbalance in poweron

[ Upstream commit 4dba27f1a14592ac4cf71c3bc1cc1fd05dea8015 ]

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 the newest pm_runtime_resume_and_get
to keep usage counter balanced.

Fixes: 34cc0aa25456 ("drm/rockchip: Add support for Rockchip Soc LVDS")
Fixes: cca1705c3d89 ("drm/rockchip: lvds: Add PX30 support")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20220922132107.105419-3-zhangqilong3@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/rockchip/rockchip_lvds.c