[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220529153456.4183738-5-cgxu519@mykernel.net>
Date: Sun, 29 May 2022 23:34:54 +0800
From: Chengguang Xu <cgxu519@...ernel.net>
To: netdev@...r.kernel.org, linux-staging@...ts.linux.dev,
linux-scsi@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
linux-media@...r.kernel.org
Cc: Chengguang Xu <cgxu519@...ernel.net>
Subject: [PATCH 4/6] drm/exynos: fix missing resource cleanup in error case
Fix missing resource cleanup(when '(--i) == 0') for error case
in gsc_runtime_resume().
Signed-off-by: Chengguang Xu <cgxu519@...ernel.net>
---
drivers/gpu/drm/exynos/exynos_drm_gsc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
index 964dceb28c1e..68ea92742b06 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
@@ -1342,7 +1342,7 @@ static int __maybe_unused gsc_runtime_resume(struct device *dev)
for (i = 0; i < ctx->num_clocks; i++) {
ret = clk_prepare_enable(ctx->clocks[i]);
if (ret) {
- while (--i > 0)
+ while (--i >= 0)
clk_disable_unprepare(ctx->clocks[i]);
return ret;
}
--
2.27.0
Powered by blists - more mailing lists