Skip to content

Commit c8f01ff

Browse files
Dan Carpenterrobclark
authored andcommitted
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: 6e0eb52 ("drm/msm/dsi: Parse bus clocks from a list") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/20211001123409.GG2283@kili Signed-off-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Rob Clark <[email protected]>
1 parent 739b4e7 commit c8f01ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/msm/dsi/dsi_host.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ static int dsi_bus_clk_enable(struct msm_dsi_host *msm_host)
451451

452452
return 0;
453453
err:
454-
for (; i > 0; i--)
454+
while (--i >= 0)
455455
clk_disable_unprepare(msm_host->bus_clks[i]);
456456

457457
return ret;

0 commit comments

Comments
 (0)