[PATCH] ppc32: Fix potentially uninitialized var in chrp_setup.c

From: Benjamin Herrenschmidt
Date: Thu Sep 23 2004 - 19:37:23 EST


Hi !

In chrp_setup.c, chrp_int_ack could be left uninitialized and passed
"as-is" to i8259_init() if the OF node for the 8259 wasn't found. I
don't know if that should happen, but the i8259 code can deal with
int_ack beeing 0, so let's be safe, initialize it, and remove a
warning at the same time.

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

===== arch/ppc/platforms/chrp_setup.c 1.34 vs edited =====
--- 1.34/arch/ppc/platforms/chrp_setup.c 2004-08-17 02:04:08 +10:00
+++ edited/arch/ppc/platforms/chrp_setup.c 2004-09-24 10:19:34 +10:00
@@ -375,7 +375,7 @@
{
struct device_node *np;
int i;
- unsigned long chrp_int_ack;
+ unsigned long chrp_int_ack = 0;
unsigned char init_senses[NR_IRQS - NUM_8259_INTERRUPTS];
#if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(XMON)
struct device_node *kbd;


-
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/