Thread (114 messages) 114 messages, 11 authors, 2021-10-20
STALE1685d REVIEWED: 1 (0M)

[PATCH 5.10 094/103] drm/msm/dsi: fix off by one in dsi_bus_clk_enable error handling

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2021-10-18 13:47:12
Also in: lkml

From: Dan Carpenter <redacted>

commit c8f01ffc83923a91e8087aaa077de13354a7aa59 upstream.

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 <redacted>
Reviewed-by: Dmitry Baryshkov <redacted>
Link: https://lore.kernel.org/r/20211001123409.GG2283@kili (local)
Signed-off-by: Dmitry Baryshkov <redacted>
Signed-off-by: Rob Clark <redacted>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/msm/dsi/dsi_host.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -464,7 +464,7 @@ static int dsi_bus_clk_enable(struct msm
 
 	return 0;
 err:
-	for (; i > 0; i--)
+	while (--i >= 0)
 		clk_disable_unprepare(msm_host->bus_clks[i]);
 
 	return ret;

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help