diff options
Diffstat (limited to 'drivers/video/atafb.c')
-rw-r--r-- | drivers/video/atafb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/video/atafb.c b/drivers/video/atafb.c index 37624f74e88b..f3aada20fa02 100644 --- a/drivers/video/atafb.c +++ b/drivers/video/atafb.c | |||
@@ -52,7 +52,6 @@ | |||
52 | #include <linux/errno.h> | 52 | #include <linux/errno.h> |
53 | #include <linux/string.h> | 53 | #include <linux/string.h> |
54 | #include <linux/mm.h> | 54 | #include <linux/mm.h> |
55 | #include <linux/slab.h> | ||
56 | #include <linux/delay.h> | 55 | #include <linux/delay.h> |
57 | #include <linux/init.h> | 56 | #include <linux/init.h> |
58 | #include <linux/interrupt.h> | 57 | #include <linux/interrupt.h> |
@@ -2242,6 +2241,9 @@ static int ext_setcolreg(unsigned int regno, unsigned int red, | |||
2242 | if (!external_vgaiobase) | 2241 | if (!external_vgaiobase) |
2243 | return 1; | 2242 | return 1; |
2244 | 2243 | ||
2244 | if (regno > 255) | ||
2245 | return 1; | ||
2246 | |||
2245 | switch (external_card_type) { | 2247 | switch (external_card_type) { |
2246 | case IS_VGA: | 2248 | case IS_VGA: |
2247 | OUTB(0x3c8, regno); | 2249 | OUTB(0x3c8, regno); |