linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] 2.5.24 matroxfb off by one error
@ 2002-06-30  0:34 Petr Vandrovec
  0 siblings, 0 replies; 2+ messages in thread
From: Petr Vandrovec @ 2002-06-30  0:34 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, linux-fbdev-devel

Hi Linus,
   please apply patch below.

   It fixes off by one error in getcolreg/setcolreg in matroxfb's 
secondary head driver.
					Thanks,
						Petr Vandrovec
						vandrove@vc.cvut.cz


diff -urdN linux/drivers/video/matrox/matroxfb_crtc2.c linux/drivers/video/matrox/matroxfb_crtc2.c
--- linux/drivers/video/matrox/matroxfb_crtc2.c	Fri Jun 21 00:53:48 2002
+++ linux/drivers/video/matrox/matroxfb_crtc2.c	Sat Jun 29 00:09:09 2002
@@ -29,7 +29,7 @@
 static int matroxfb_dh_getcolreg(unsigned regno, unsigned *red, unsigned *green,
 		unsigned *blue, unsigned *transp, struct fb_info* info) {
 #define m2info ((struct matroxfb_dh_fb_info*)info)
-	if (regno > 16)
+	if (regno >= 16)
 		return 1;
 	*red = m2info->palette[regno].red;
 	*blue = m2info->palette[regno].blue;
@@ -44,7 +44,7 @@
 #define m2info ((struct matroxfb_dh_fb_info*)info)
 	struct display* p;
 
-	if (regno > 16)
+	if (regno >= 16)
 		return 1;
 	m2info->palette[regno].red = red;
 	m2info->palette[regno].blue = blue;


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
No, I will not fix your computer.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 2+ messages in thread
[parent not found: <20020630003410.GH25118@ppc.vc.cvut.cz>]

end of thread, other threads:[~2002-07-01 17:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-30  0:34 [PATCH] 2.5.24 matroxfb off by one error Petr Vandrovec
     [not found] <20020630003410.GH25118@ppc.vc.cvut.cz>
2002-07-01 17:05 ` James Simmons

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).