Skip to content

Commit

Permalink
drm/msm/dsi: fix off by one in dsi_bus_clk_enable error handling
Browse files Browse the repository at this point in the history
This disables a lock which wasn't enabled and it does not disable
the first lock in the array.

Fixes: 6e0eb52 ("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>
  • Loading branch information
Dan Carpenter authored and Rob Clark committed Oct 12, 2021
1 parent 739b4e7 commit c8f01ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/msm/dsi/dsi_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c8f01ff

Please sign in to comment.