summaryrefslogtreecommitdiffstats
path: root/drivers/video/atafb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/atafb.c')
-rw-r--r--drivers/video/atafb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/atafb.c b/drivers/video/atafb.c
index 37624f7..b7687c5 100644
--- a/drivers/video/atafb.c
+++ b/drivers/video/atafb.c
@@ -2242,6 +2242,9 @@ static int ext_setcolreg(unsigned int regno, unsigned int red,
if (!external_vgaiobase)
return 1;
+ if (regno > 255)
+ return 1;
+
switch (external_card_type) {
case IS_VGA:
OUTB(0x3c8, regno);
OpenPOWER on IntegriCloud