aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/atafb.c
diff options
context:
space:
mode:
authorKrzysztof Helt <krzysztof.h1@wp.pl>2009-12-15 19:46:25 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 10:20:01 -0500
commit2f390380ca69e1617cdddb12d8da94f0a9f4319d (patch)
tree2f60b69e62e099c43a90197c62704f099ad2169e /drivers/video/atafb.c
parent2cb96f86628d6e97fcbda5fe4d8d74876239834c (diff)
fbdev: add palette register check to several drivers
Add check if palette register number is in correct range for few drivers which miss it. The regno value comes indirectly from user space. Two drivers has converted check from BUG_ON() macro to just return an error (non-zero value). Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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 b7687c55fe16..2051c9dc813b 100644
--- a/drivers/video/atafb.c
+++ b/drivers/video/atafb.c
@@ -2245,6 +2245,9 @@ static int ext_setcolreg(unsigned int regno, unsigned int red,
2245 if (regno > 255) 2245 if (regno > 255)
2246 return 1; 2246 return 1;
2247 2247
2248 if (regno > 255)
2249 return 1;
2250
2248 switch (external_card_type) { 2251 switch (external_card_type) {
2249 case IS_VGA: 2252 case IS_VGA:
2250 OUTB(0x3c8, regno); 2253 OUTB(0x3c8, regno);