Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1588294

[PATCH] drm/msm/dsi: Fix the releasing of resources in error path in 'dsi_bus_clk_enable()'

From Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Newsgroups linux.kernel
Subject [PATCH] drm/msm/dsi: Fix the releasing of resources in error path in 'dsi_bus_clk_enable()'
Date 2017-02-26 09:00 +0100
Message-ID <tf1Um-3Gs-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


If a 'clk_prepare_enable()' fails, then we need to disable_unprepare the
clk already handled.

With the current implemenatation, we try to do that on the clk that has
triggered the error, which is a no-op, and leave 'msm_host->bus_clks[0]'
untouched.

Shift by one the index array to free resources correctly.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 1fc07ce24686..eac4987f3946 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -438,7 +438,7 @@ static int dsi_bus_clk_enable(struct msm_dsi_host *msm_host)
 	return 0;
 err:
 	for (; i > 0; i--)
-		clk_disable_unprepare(msm_host->bus_clks[i]);
+		clk_disable_unprepare(msm_host->bus_clks[i-1]);
 
 	return ret;
 }
-- 
2.9.3

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] drm/msm/dsi: Fix the releasing of resources in error path in 'dsi_bus_clk_enable()' Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-02-26 09:00 +0100
  Re: [PATCH] drm/msm/dsi: Fix the releasing of resources in error  path in 'dsi_bus_clk_enable()' walter harms <wharms@bfs.de> - 2017-02-26 10:10 +0100
  Re: [PATCH] drm/msm/dsi: Fix the releasing of resources in error path  in 'dsi_bus_clk_enable()' Rob Clark <robdclark@gmail.com> - 2017-02-26 14:10 +0100

csiph-web