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)
committerThierry Reding <treding@nvidia.com>
Thu, 14 Dec 2023 17:27:11 +0000 (18:27 +0100)
commit0800880f4eb789b7d299db40f2e86e056bd33a4e
treeb06bc52c10ca42f8a597b7eaf4180c0d2b702d76
parent11aa6d78ab8b135bdeba0bdaa10e63527c837b89
drm/tegra: dpaux: Fix PM disable depth imbalance in tegra_dpaux_probe

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
drivers/gpu/drm/tegra/dpaux.c