diff mbox series

[SRU,H/raspi,2/7] drm/vc4: hdmi: Remove unnecessary pm_runtime_put

Message ID 20211004181653.8298-3-juergh@canonical.com
State New
Headers show
Series HDMI does not display anything with Impish RPi desktop image (LP: #1944397) | expand

Commit Message

Juerg Haefliger Oct. 4, 2021, 6:16 p.m. UTC
From: Maxime Ripard <maxime@cerno.tech>

BugLink: https://bugs.launchpad.net/bugs/1944397

Unlike pm_runtime_get_sync(), pm_runtime_resume_and_get() doesn't take a
reference on failure, so we don't need to call pm_runtime_put() on
failure.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>

(cherry picked from commit 42111230f631c76840be67376bebcc6b06e3baca linux-rpi)
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
---
 drivers/gpu/drm/vc4/vc4_hdmi.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index ccc1ef339e4c..780d06732925 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -915,7 +915,6 @@  static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder,
 	ret = pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev);
 	if (ret < 0) {
 		DRM_ERROR("Failed to retain power domain: %d\n", ret);
-		pm_runtime_put(&vc4_hdmi->pdev->dev);
 		return;
 	}