diff options
Diffstat (limited to 'drivers/video/matrox/matroxfb_base.c')
-rw-r--r-- | drivers/video/matrox/matroxfb_base.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c index 886e475f22f2..86ca7b179000 100644 --- a/drivers/video/matrox/matroxfb_base.c +++ b/drivers/video/matrox/matroxfb_base.c | |||
@@ -679,6 +679,8 @@ static int matroxfb_setcolreg(unsigned regno, unsigned red, unsigned green, | |||
679 | mga_outb(M_DAC_VAL, blue); | 679 | mga_outb(M_DAC_VAL, blue); |
680 | break; | 680 | break; |
681 | case 16: | 681 | case 16: |
682 | if (regno >= 16) | ||
683 | break; | ||
682 | { | 684 | { |
683 | u_int16_t col = | 685 | u_int16_t col = |
684 | (red << ACCESS_FBINFO(fbcon).var.red.offset) | | 686 | (red << ACCESS_FBINFO(fbcon).var.red.offset) | |
@@ -690,6 +692,8 @@ static int matroxfb_setcolreg(unsigned regno, unsigned red, unsigned green, | |||
690 | break; | 692 | break; |
691 | case 24: | 693 | case 24: |
692 | case 32: | 694 | case 32: |
695 | if (regno >= 16) | ||
696 | break; | ||
693 | ACCESS_FBINFO(cmap[regno]) = | 697 | ACCESS_FBINFO(cmap[regno]) = |
694 | (red << ACCESS_FBINFO(fbcon).var.red.offset) | | 698 | (red << ACCESS_FBINFO(fbcon).var.red.offset) | |
695 | (green << ACCESS_FBINFO(fbcon).var.green.offset) | | 699 | (green << ACCESS_FBINFO(fbcon).var.green.offset) | |