Skip to contentSkip to conversation

powerpc: Fix warning in prom_parse.c of_irq_map_oldworld()

PATCH New Benjamin Herrenschmidt 1 participant 1 message Mar 7, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 powerpc: Fix warning in prom_parse.c of_irq_map_oldworld()

This function spews a warning due to possible use of an uninitialized variable. This can happen on broken device-trees or when called with a NULL argument. Makes ure we properly fail instead.

 arch/powerpc/kernel/prom_parse.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/prom_parse.c +1 -1
Index: linux-tika/arch/powerpc/kernel/prom_parse.c
===================================================================
@@ -916,7 +916,7 @@
 static int of_irq_map_oldworld(struct device_node *device, int index,
 			       struct of_irq *out_irq)
 {
-	const u32 *ints;
+	const u32 *ints = NULL;
 	int intlen;
 
 	/*