summaryrefslogtreecommitdiff
path: root/drivers/video/pmagb-b-fb.c
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2010-01-08 11:11:18 +0300
committerJaroslav Kysela <perex@perex.cz>2010-01-08 11:11:18 +0300
commita4ad68d57e4dc4138304df23d1817eb094149389 (patch)
treeca7d8c4ce5377c4251560de06e15dd7be7063351 /drivers/video/pmagb-b-fb.c
parentcd9d95a55550555da8e587ead9cbba5f98a371a3 (diff)
parentc97259df3f2e163c72f4d0685c61fb2e026dc989 (diff)
downloadlinux-a4ad68d57e4dc4138304df23d1817eb094149389.tar.xz
Merge branch 'topic/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into devel
Diffstat (limited to 'drivers/video/pmagb-b-fb.c')
-rw-r--r--drivers/video/pmagb-b-fb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/pmagb-b-fb.c b/drivers/video/pmagb-b-fb.c
index 98748723af9f..2de0806421b4 100644
--- a/drivers/video/pmagb-b-fb.c
+++ b/drivers/video/pmagb-b-fb.c
@@ -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 */