[POWERPC] Fix warning in prom_parse.c of_irq_map_oldworld()
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 7 Mar 2007 10:27:37 +0000 (11:27 +0100)
committerPaul Mackerras <paulus@samba.org>
Wed, 7 Mar 2007 17:09:33 +0000 (04:09 +1100)
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.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/prom_parse.c

index ea6fd55..91b443c 100644 (file)
@@ -916,7 +916,7 @@ EXPORT_SYMBOL_GPL(of_irq_map_raw);
 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;
 
        /*