Skip to content

Commit

Permalink
modedb: fix incorrect sync and vmode flags for CVT modes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Krzysztof Helt authored and Linus Torvalds committed Jun 6, 2008
1 parent b8c141e commit e2d4eca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/video/modedb.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ int fb_find_mode(struct fb_var_screeninfo *var,
"", (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;
Expand Down

0 comments on commit e2d4eca

Please sign in to comment.