aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/riva/fbdev.c
diff options
context:
space:
mode:
authorDanny Kukawka <danny.kukawka@bisect.de>2012-01-30 17:00:17 -0500
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2012-02-12 21:59:14 -0500
commitc718a54649475cc397484f96e70f6d0fdd267165 (patch)
treed9762c96873d0697d4ba16f43040814fc4640f1d /drivers/video/riva/fbdev.c
parentc6d242aa64d27ebd258a12aa0a5da068e25e01f5 (diff)
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: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/riva/fbdev.c')
-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 2f58cf9c813b..90df1a60bd16 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,
1816 specs->modedb, specs->modedb_len, 1816 specs->modedb, specs->modedb_len,
1817 NULL, 8); 1817 NULL, 8);
1818 } else if (specs->modedb != NULL) { 1818 } else if (specs->modedb != NULL) {
1819 /* get first mode in database as fallback */
1820 modedb = specs->modedb[0];
1819 /* get preferred timing */ 1821 /* get preferred timing */
1820 if (info->monspecs.misc & FB_MISC_1ST_DETAIL) { 1822 if (info->monspecs.misc & FB_MISC_1ST_DETAIL) {
1821 int i; 1823 int i;
@@ -1826,9 +1828,6 @@ static void __devinit riva_update_default_var(struct fb_var_screeninfo *var,
1826 break; 1828 break;
1827 } 1829 }
1828 } 1830 }
1829 } else {
1830 /* otherwise, get first mode in database */
1831 modedb = specs->modedb[0];
1832 } 1831 }
1833 var->bits_per_pixel = 8; 1832 var->bits_per_pixel = 8;
1834 riva_update_var(var, &modedb); 1833 riva_update_var(var, &modedb);