Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176634
b: refs/heads/master
c: 2f39038
h: refs/heads/master
v: v3
  • Loading branch information
Krzysztof Helt authored and Linus Torvalds committed Dec 16, 2009
1 parent 4bba982 commit 3cbd215
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2cb96f86628d6e97fcbda5fe4d8d74876239834c
refs/heads/master: 2f390380ca69e1617cdddb12d8da94f0a9f4319d
3 changes: 3 additions & 0 deletions trunk/drivers/video/atafb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2245,6 +2245,9 @@ static int ext_setcolreg(unsigned int regno, unsigned int red,
if (regno > 255)
return 1;

if (regno > 255)
return 1;

switch (external_card_type) {
case IS_VGA:
OUTB(0x3c8, regno);
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/video/ep93xx-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ static int ep93xxfb_setcolreg(unsigned int regno, unsigned int red,

switch (info->fix.visual) {
case FB_VISUAL_PSEUDOCOLOR:
if (regno > 255)
return 1;
rgb = ((red & 0xff00) << 8) | (green & 0xff00) |
((blue & 0xff00) >> 8);

Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/video/maxinefb.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ static int maxinefb_setcolreg(unsigned regno, unsigned red, unsigned green,
/* value to be written into the palette reg. */
unsigned long hw_colorvalue = 0;

if (regno > 255)
return 1;

red >>= 8; /* The cmap fields are 16 bits */
green >>= 8; /* wide, but the harware colormap */
blue >>= 8; /* registers are only 8 bits wide */
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/video/pmag-ba-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ static int pmagbafb_setcolreg(unsigned int regno, unsigned int red,
{
struct pmagbafb_par *par = info->par;

BUG_ON(regno >= info->cmap.len);
if (regno >= info->cmap.len)
return 1;

red >>= 8; /* The cmap fields are 16 bits */
green >>= 8; /* wide, but the hardware colormap */
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/video/pmagb-b-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ static int pmagbbfb_setcolreg(unsigned int regno, unsigned int red,
{
struct pmagbbfb_par *par = info->par;

BUG_ON(regno >= info->cmap.len);
if (regno >= info->cmap.len)
return 1;

red >>= 8; /* The cmap fields are 16 bits */
green >>= 8; /* wide, but the hardware colormap */
Expand Down

0 comments on commit 3cbd215

Please sign in to comment.