Commit c8f01ffc authored by Dan Carpenter's avatar Dan Carpenter Committed by Rob Clark

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: 6e0eb52e ("drm/msm/dsi: Parse bus clocks from a list")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20211001123409.GG2283@kiliSigned-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
parent 739b4e77
...@@ -451,7 +451,7 @@ static int dsi_bus_clk_enable(struct msm_dsi_host *msm_host) ...@@ -451,7 +451,7 @@ static int dsi_bus_clk_enable(struct msm_dsi_host *msm_host)
return 0; return 0;
err: err:
for (; i > 0; i--) while (--i >= 0)
clk_disable_unprepare(msm_host->bus_clks[i]); clk_disable_unprepare(msm_host->bus_clks[i]);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment