diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-10-01 15:34:09 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2021-10-11 17:30:54 -0700 |
commit | c8f01ffc83923a91e8087aaa077de13354a7aa59 (patch) | |
tree | bb90ab9bc2fd1cfbaf900bae2a7cd2ed83f2f4c2 /drivers/gpu/drm | |
parent | 739b4e7756d3301dd673ca517afca46a5f635562 (diff) | |
download | lwn-c8f01ffc83923a91e8087aaa077de13354a7aa59.tar.gz lwn-c8f01ffc83923a91e8087aaa077de13354a7aa59.zip |
drm/msm/dsi: fix off by one in dsi_bus_clk_enable error handling
This disables a lock which wasn't enabled and it does not disable
the first lock in the array.
Fixes: 6e0eb52eba9e ("drm/msm/dsi: Parse bus clocks from a list")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20211001123409.GG2283@kili
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/msm/dsi/dsi_host.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index e269df285136..c86b5090fae6 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -451,7 +451,7 @@ static int dsi_bus_clk_enable(struct msm_dsi_host *msm_host) return 0; err: - for (; i > 0; i--) + while (--i >= 0) clk_disable_unprepare(msm_host->bus_clks[i]); return ret; |