powerpc: Fix old bug in prom_init setting of the color
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 14 Dec 2011 13:55:11 +0000 (13:55 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 19 Dec 2011 03:41:25 +0000 (14:41 +1100)
We have an array of 16 entries and a loop of 32 iterations... oops.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/prom_init.c

index 32b5b05..55b4080 100644 (file)
@@ -2080,7 +2080,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;