[PATCH 2.6.19-rc3] i386/io_apic: fix compiler warning in create_irq

From: Stefan Richter
Date: Sun Oct 29 2006 - 16:04:43 EST


Fix warning
arch/i386/kernel/io_apic.c: In function `create_irq':
arch/i386/kernel/io_apic.c:2420: warning: 'vector' might be used uninitialized in this function

Signed-off-by: Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx>
---

Only compile-tested.
arch/x86_64/kernel/io_apic.c seems to have the same initialization already.

Index: linux-2.6.19-rc3/arch/i386/kernel/io_apic.c
===================================================================
--- linux-2.6.19-rc3.orig/arch/i386/kernel/io_apic.c 2006-10-29 20:41:20.000000000 +0100
+++ linux-2.6.19-rc3/arch/i386/kernel/io_apic.c 2006-10-29 21:55:19.000000000 +0100
@@ -2421,6 +2421,7 @@ int create_irq(void)
unsigned long flags;

irq = -ENOSPC;
+ vector = 0;
spin_lock_irqsave(&vector_lock, flags);
for (new = (NR_IRQS - 1); new >= 0; new--) {
if (platform_legacy_irq(new))


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