Commit c718a546 authored by Danny Kukawka's avatar Danny Kukawka Committed by Florian Tobias Schandinat

riva/fbdev: fix several -Wuninitialized

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: default avatarDanny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: default avatarFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
parent c6d242aa
...@@ -1816,6 +1816,8 @@ static void __devinit riva_update_default_var(struct fb_var_screeninfo *var, ...@@ -1816,6 +1816,8 @@ static void __devinit riva_update_default_var(struct fb_var_screeninfo *var,
specs->modedb, specs->modedb_len, specs->modedb, specs->modedb_len,
NULL, 8); NULL, 8);
} else if (specs->modedb != NULL) { } else if (specs->modedb != NULL) {
/* get first mode in database as fallback */
modedb = specs->modedb[0];
/* get preferred timing */ /* get preferred timing */
if (info->monspecs.misc & FB_MISC_1ST_DETAIL) { if (info->monspecs.misc & FB_MISC_1ST_DETAIL) {
int i; int i;
...@@ -1826,9 +1828,6 @@ static void __devinit riva_update_default_var(struct fb_var_screeninfo *var, ...@@ -1826,9 +1828,6 @@ static void __devinit riva_update_default_var(struct fb_var_screeninfo *var,
break; break;
} }
} }
} else {
/* otherwise, get first mode in database */
modedb = specs->modedb[0];
} }
var->bits_per_pixel = 8; var->bits_per_pixel = 8;
riva_update_var(var, &modedb); riva_update_var(var, &modedb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment