diff mbox series

[-next,2/3] drm/gem: Add missing clk_disable_unprepare in ade_power_up

Message ID 20240803063030.316390-3-cuigaosheng1@huawei.com
State New
Headers show
Series Add missing clk_disable_unprepare | expand

Commit Message

Gaosheng Cui Aug. 3, 2024, 6:30 a.m. UTC
Add the missing clk_disable_unprepare() before return in
ade_power_up().

Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
---
 drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
index 871f79a6b17e..942560a717ff 100644
--- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
+++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
@@ -229,12 +229,14 @@  static int ade_power_up(struct ade_hw_ctx *ctx)
 	ret = reset_control_deassert(ctx->reset);
 	if (ret) {
 		DRM_ERROR("failed to deassert reset\n");
+		clk_disable_unprepare(ctx->media_noc_clk);
 		return ret;
 	}
 
 	ret = clk_prepare_enable(ctx->ade_core_clk);
 	if (ret) {
 		DRM_ERROR("failed to enable ade_core_clk (%d)\n", ret);
+		clk_disable_unprepare(ctx->media_noc_clk);
 		return ret;
 	}