Skip to content

Commit

Permalink
riva/fbdev: fix several -Wuninitialized
Browse files Browse the repository at this point in the history
Fix several -Wuninitialized compiler warnings by changing the
order of getting modedb in riva_update_default_var() to set
first the fallback and then the prefered timing.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
  • Loading branch information
Danny Kukawka authored and Florian Tobias Schandinat committed Feb 13, 2012
1 parent c6d242a commit c718a54
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/video/riva/fbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1816,6 +1816,8 @@ static void __devinit riva_update_default_var(struct fb_var_screeninfo *var,
specs->modedb, specs->modedb_len,
NULL, 8);
} else if (specs->modedb != NULL) {
/* get first mode in database as fallback */
modedb = specs->modedb[0];
/* get preferred timing */
if (info->monspecs.misc & FB_MISC_1ST_DETAIL) {
int i;
Expand All @@ -1826,9 +1828,6 @@ static void __devinit riva_update_default_var(struct fb_var_screeninfo *var,
break;
}
}
} else {
/* otherwise, get first mode in database */
modedb = specs->modedb[0];
}
var->bits_per_pixel = 8;
riva_update_var(var, &modedb);
Expand Down

0 comments on commit c718a54

Please sign in to comment.