Skip to contentSkip to conversation

powerpc: Fix old bug in prom_init setting of the color

PATCH New Benjamin Herrenschmidt 1 participant 1 message Dec 14, 2011 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Fix old bug in prom_init setting of the color

We have an array of 16 entries and a loop of 32 iterations... oops.

---
 arch/powerpc/kernel/prom_init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/kernel/prom_init.c +1 -1
index cc58486..e3d0ecd 100644
@@ -2079,7 +2079,7 @@ static void __init prom_check_displays(void)
 		/* Setup a usable color table when the appropriate
 		 * method is available. Should update this to set-colors */
 		clut = RELOC(default_colors);
-		for (i = 0; i < 32; i++, clut += 3)
+		for (i = 0; i < 16; i++, clut += 3)
 			if (prom_set_color(ih, i, clut[0], clut[1],
 					   clut[2]) != 0)
 				break;