Explorar o código

[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.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Benjamin Herrenschmidt %!s(int64=19) %!d(string=hai) anos
pai
achega
84532c9120
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      arch/powerpc/kernel/prom_parse.c

+ 1 - 1
arch/powerpc/kernel/prom_parse.c

@@ -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;
 
 	/*