[PATCH -mm] aty128_decode_var gcc 4.1 warning fix

From: Daniel Walker
Date: Tue May 09 2006 - 22:56:11 EST


It appears to be possible to get a random post divider, if aty128_var_to_pll()
doesn't find one in the table .. Needs review .

Fixes the following warning,

drivers/video/aty/aty128fb.c: In function â??aty128_decode_varâ??:
drivers/video/aty/aty128fb.c:1516: warning: â??pll.post_dividerâ?? may be used uninitialized in this function

Signed-Off-By: Daniel Walker <dwalker@xxxxxxxxxx>

Index: linux-2.6.16/drivers/video/aty/aty128fb.c
===================================================================
--- linux-2.6.16.orig/drivers/video/aty/aty128fb.c
+++ linux-2.6.16/drivers/video/aty/aty128fb.c
@@ -1513,7 +1513,7 @@ static int aty128_decode_var(struct fb_v
{
int err;
struct aty128_crtc crtc;
- struct aty128_pll pll;
+ struct aty128_pll pll = { .post_divider = 1 };
struct aty128_ddafifo fifo_reg;

if ((err = aty128_var_to_crtc(var, &crtc, par)))
-
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/