[PATCH] radeonfb: Fix warnings about uninitialized variables

From: Benjamin Herrenschmidt
Date: Wed Sep 15 2004 - 02:30:24 EST


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.

Signed-off-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>

===== drivers/video/aty/radeon_base.c 1.28 vs edited =====
--- 1.28/drivers/video/aty/radeon_base.c 2004-09-13 14:05:55 +10:00
+++ edited/drivers/video/aty/radeon_base.c 2004-09-15 17:20:16 +10:00
@@ -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 =====
--- 1.7/drivers/video/aty/radeon_monitor.c 2004-05-17 01:59:32 +10:00
+++ edited/drivers/video/aty/radeon_monitor.c 2004-09-15 17:19:25 +10:00
@@ -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) {




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/