drm/vc4: hdmi: Rework the pre_crtc_configure error handling
authorMaxime Ripard <maxime@cerno.tech>
Thu, 19 Aug 2021 13:59:28 +0000 (15:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:03:05 +0000 (11:03 +0100)
commit2bba39feaa3e9c029d882cc8b5715740ebbcda0f
tree9fb8dbf848b1182d171eb77207b62ac3fa8fc883
parenta26aa0f3982f8bb3f8630cd0db81f9cd4d55f14d
drm/vc4: hdmi: Rework the pre_crtc_configure error handling

[ Upstream commit caa51a4c11f1cadba9bcf61ed9e0105711952ce7 ]

Since our pre_crtc_configure hook returned void, we didn't implement a
goto-based error path handling, leading to errors like failing to put
back the device in pm_runtime in all the error paths, but also failing
to disable the pixel clock if clk_set_min_rate on the HSM clock fails.

Move to a goto-based implementation to have an easier consitency.

Fixes: 4f6e3d66ac52 ("drm/vc4: Add runtime PM support to the HDMI encoder driver")
Link: https://patchwork.freedesktop.org/patch/msgid/20210819135931.895976-4-maxime@cerno.tech
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/vc4/vc4_hdmi.c