Skip to contentSkip to conversation

radeonfb: Fix warnings about uninitialized variables

PATCH New Benjamin Herrenschmidt 1 participant 1 message Sep 15, 2004 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 radeonfb: Fix warnings about uninitialized variables

Hi !

This patch fixes a couple of warnings about possible uninitialized variables in radeonfb, along with a small logic error in the monitor probe code when nothing was found.

===== drivers/video/aty/radeon_base.c 1.28 vs edited =====

drivers/video/aty/radeon_base.c +1 -1
@@ -1868,7 +1868,7 @@
 #undef SET_MC_FB_FROM_APERTURE
 static void fixup_memory_mappings(struct radeonfb_info *rinfo)
 {
-	u32 save_crtc_gen_cntl, save_crtc2_gen_cntl;
+	u32 save_crtc_gen_cntl, save_crtc2_gen_cntl = 0;
 	u32 save_crtc_ext_cntl;
 	u32 aper_base, aper_size;
 	u32 agp_base;

===== drivers/video/aty/radeon_monitor.c 1.7 vs edited =====

drivers/video/aty/radeon_monitor.c +4 -2
@@ -69,8 +69,10 @@
 		mt = MT_DFP;
 	else if (!strcmp(pmt, "CRT"))
 		mt = MT_CRT;
-	else if (strcmp(pmt, "NONE")) {
-		printk(KERN_WARNING "radeonfb: Unknown OF display-type: %s\n", pmt);
+	else {
+		if (strcmp(pmt, "NONE") != 0)
+			printk(KERN_WARNING "radeonfb: Unknown OF display-type: %s\n",
+			       pmt);
 		return MT_NONE;
 	}
 	for (i = 0; propnames[i] != NULL; ++i) {