aboutsummaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorDanny Kukawka <danny.kukawka@bisect.de>2012-01-30 23:00:17 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-12-03 12:59:12 -0800
commit7ddaba0a4191dfa77db0167a76a7b3e1d46cbd2d (patch)
tree0770170c278a0b624e0afa178dc062375b6c1db9 /drivers/video
parent6ce2a94fa9a777fd21ac9aa42015a6d0b788c749 (diff)
riva/fbdev: fix several -Wuninitialized
commit c718a54649475cc397484f96e70f6d0fdd267165 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/riva/fbdev.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c
index d8ab7be4fd6..fabc90deae3 100644
--- a/drivers/video/riva/fbdev.c
+++ b/drivers/video/riva/fbdev.c
@@ -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;
@@ -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);