瀏覽代碼

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>
Tomi Valkeinen 13 年之前
父節點
當前提交
4c6c65b013
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      drivers/video/omap2/dss/dispc.c

+ 3 - 2
drivers/video/omap2/dss/dispc.c

@@ -3901,6 +3901,7 @@ static void dispc_error_worker(struct work_struct *work)
 		bit = mgr_desc[i].sync_lost_irq;
 		bit = mgr_desc[i].sync_lost_irq;
 
 
 		if (bit & errors) {
 		if (bit & errors) {
+			int j;
 			struct omap_dss_device *dssdev = mgr->get_device(mgr);
 			struct omap_dss_device *dssdev = mgr->get_device(mgr);
 			bool enable;
 			bool enable;
 
 
@@ -3911,9 +3912,9 @@ static void dispc_error_worker(struct work_struct *work)
 			enable = dssdev->state == OMAP_DSS_DISPLAY_ACTIVE;
 			enable = dssdev->state == OMAP_DSS_DISPLAY_ACTIVE;
 			dssdev->driver->disable(dssdev);
 			dssdev->driver->disable(dssdev);
 
 
-			for (i = 0; i < omap_dss_get_num_overlays(); ++i) {
+			for (j = 0; j < omap_dss_get_num_overlays(); ++j) {
 				struct omap_overlay *ovl;
 				struct omap_overlay *ovl;
-				ovl = omap_dss_get_overlay(i);
+				ovl = omap_dss_get_overlay(j);
 
 
 				if (ovl->id != OMAP_DSS_GFX &&
 				if (ovl->id != OMAP_DSS_GFX &&
 						ovl->manager == mgr)
 						ovl->manager == mgr)