Skip to content

Commit 4c6c65b

Browse files
committed
OMAPDSS: DISPC: fix loop in error handler
The dispc's error handler has a loop inside another loop, and both use the same loop variable. This is clearly wrong, and this patch makes a new variable for the inner loop. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
1 parent 901e5fe commit 4c6c65b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎drivers/video/omap2/dss/dispc.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3901,6 +3901,7 @@ static void dispc_error_worker(struct work_struct *work)
39013901
bit = mgr_desc[i].sync_lost_irq;
39023902

39033903
if (bit & errors) {
3904+
int j;
39043905
struct omap_dss_device *dssdev = mgr->get_device(mgr);
39053906
bool enable;
39063907

@@ -3911,9 +3912,9 @@ static void dispc_error_worker(struct work_struct *work)
39113912
enable = dssdev->state == OMAP_DSS_DISPLAY_ACTIVE;
39123913
dssdev->driver->disable(dssdev);
39133914

3914-
for (i = 0; i < omap_dss_get_num_overlays(); ++i) {
3915+
for (j = 0; j < omap_dss_get_num_overlays(); ++j) {
39153916
struct omap_overlay *ovl;
3916-
ovl = omap_dss_get_overlay(i);
3917+
ovl = omap_dss_get_overlay(j);
39173918

39183919
if (ovl->id != OMAP_DSS_GFX &&
39193920
ovl->manager == mgr)

0 commit comments

Comments
 (0)