]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/tegra: dpaux: Fix PM disable depth imbalance in tegra_dpaux_probe
authorZhang Shurong <zhang_shurong@foxmail.com>
Wed, 4 Oct 2023 14:10:55 +0000 (22:10 +0800)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:41 +0000 (18:19 -0400)
commit58252c351c8fc51dea5d3650cb15274a6bb970d9
treeaecb0381d30a7ff2021b40fc1c650652a2f34e52
parent52aa507148c4aad41436e2005d742ffcafad9976
drm/tegra: dpaux: Fix PM disable depth imbalance in tegra_dpaux_probe

[ Upstream commit 0800880f4eb789b7d299db40f2e86e056bd33a4e ]

The pm_runtime_enable function increases the power disable depth,
which means that we must perform a matching decrement on the error
handling path to maintain balance within the given context.
Additionally, we need to address the same issue for pm_runtime_get_sync.
We fix this by invoking pm_runtime_disable and pm_runtime_put_sync
when error returns.

Fixes: 82b81b3ec1a7 ("drm/tegra: dpaux: Implement runtime PM")
Signed-off-by: Zhang Shurong <zhang_shurong@foxmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/tencent_B13DB7F6C0023C46157250A524966F326A09@qq.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/tegra/dpaux.c