]> err.no Git - linux-2.6/commitdiff
modedb: fix incorrect sync and vmode flags for CVT modes
authorKrzysztof Helt <krzysztof.h1@wp.pl>
Fri, 6 Jun 2008 05:45:56 +0000 (22:45 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Jun 2008 18:29:09 +0000 (11:29 -0700)
The temporary structure for calculated CVT mode is not initialized.  Few
fields have only bits or-ed or and-ed so they may be left in incorrect
(random) state.

Testing of the tridentfb seems like a good exercise for the fbdev layer.

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>
drivers/video/modedb.c

index 473562191586f2101d169d8fb765b7b21ef4d2e4..d1bbef930dfa616293b9bf33cf407a6a5c65825d 100644 (file)
@@ -590,6 +590,7 @@ done:
                    "", (margins) ? " with margins" : "", (interlace) ?
                    " interlaced" : "");
 
+           memset(&cvt_mode, 0, sizeof(cvt_mode));
            cvt_mode.xres = xres;
            cvt_mode.yres = yres;
            cvt_mode.refresh = (refresh) ? refresh : 60;