|
@@ -92,6 +92,9 @@ static int maxinefb_setcolreg(unsigned regno, unsigned red, unsigned green,
|
|
/* value to be written into the palette reg. */
|
|
/* value to be written into the palette reg. */
|
|
unsigned long hw_colorvalue = 0;
|
|
unsigned long hw_colorvalue = 0;
|
|
|
|
|
|
|
|
+ if (regno > 255)
|
|
|
|
+ return 1;
|
|
|
|
+
|
|
red >>= 8; /* The cmap fields are 16 bits */
|
|
red >>= 8; /* The cmap fields are 16 bits */
|
|
green >>= 8; /* wide, but the harware colormap */
|
|
green >>= 8; /* wide, but the harware colormap */
|
|
blue >>= 8; /* registers are only 8 bits wide */
|
|
blue >>= 8; /* registers are only 8 bits wide */
|