drm/vc4: hdmi: Fix HPD GPIO error path
authorMaxime Ripard <maxime@cerno.tech>
Fri, 2 Jul 2021 09:54:47 +0000 (11:54 +0200)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Fri, 2 Jul 2021 15:45:04 +0000 (16:45 +0100)
commit827ba39e559f74f989ac951f0b1c750430717a88
tree78feb638e709437d1ee4e38041e575220451e99a
parent7b8a60c1cd5470827c196c201e17b214f52d51ef
drm/vc4: hdmi: Fix HPD GPIO error path

The HPD GPIO retrieval code on failure will jump to the
err_unprepare_hsm label that calls pm_runtime_disable.

However at that point we haven't called pm_runtime_enable, so we end up
with an unbalanced call.

The next error than can occur (and therefore the next label) needs both
pm_runtime_disable and drm_encoder_cleanup though, so let's rearrange
the labels to match what we expect.

Fixes: cd4cb49dc5bb ("drm/vc4: hdmi: Adjust HSM clock rate depending on pixel rate")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/vc4/vc4_hdmi.c