diff options
Diffstat (limited to 'drivers/video/maxinefb.c')
-rw-r--r-- | drivers/video/maxinefb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/maxinefb.c b/drivers/video/maxinefb.c index 5e91c2b30af9..7854c7a37dc5 100644 --- a/drivers/video/maxinefb.c +++ b/drivers/video/maxinefb.c | |||
@@ -92,6 +92,9 @@ static int maxinefb_setcolreg(unsigned regno, unsigned red, unsigned green, | |||
92 | /* value to be written into the palette reg. */ | 92 | /* value to be written into the palette reg. */ |
93 | unsigned long hw_colorvalue = 0; | 93 | unsigned long hw_colorvalue = 0; |
94 | 94 | ||
95 | if (regno > 255) | ||
96 | return 1; | ||
97 | |||
95 | red >>= 8; /* The cmap fields are 16 bits */ | 98 | red >>= 8; /* The cmap fields are 16 bits */ |
96 | green >>= 8; /* wide, but the harware colormap */ | 99 | green >>= 8; /* wide, but the harware colormap */ |
97 | blue >>= 8; /* registers are only 8 bits wide */ | 100 | blue >>= 8; /* registers are only 8 bits wide */ |