diff options
Diffstat (limited to 'drivers/video/pmag-ba-fb.c')
-rw-r--r-- | drivers/video/pmag-ba-fb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/pmag-ba-fb.c b/drivers/video/pmag-ba-fb.c index 0573ec685a57..0f361b6100d2 100644 --- a/drivers/video/pmag-ba-fb.c +++ b/drivers/video/pmag-ba-fb.c | |||
@@ -98,7 +98,8 @@ static int pmagbafb_setcolreg(unsigned int regno, unsigned int red, | |||
98 | { | 98 | { |
99 | struct pmagbafb_par *par = info->par; | 99 | struct pmagbafb_par *par = info->par; |
100 | 100 | ||
101 | BUG_ON(regno >= info->cmap.len); | 101 | if (regno >= info->cmap.len) |
102 | return 1; | ||
102 | 103 | ||
103 | red >>= 8; /* The cmap fields are 16 bits */ | 104 | red >>= 8; /* The cmap fields are 16 bits */ |
104 | green >>= 8; /* wide, but the hardware colormap */ | 105 | green >>= 8; /* wide, but the hardware colormap */ |