summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2015-04-29 04:29:24 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2015-04-29 04:29:24 +0000
commit734eb8d107a265b26a5f719c304065c164e58bdb (patch)
tree5982e58829af13a1e505754ef177bd89c7787c23
parent0d4a918906e39bd2505fb246023ef1ebe9dfca66 (diff)
Move a variable's initialisation so a panic will work as intended.
ok guenther@ deraadt@
-rw-r--r--sys/arch/i386/i386/ioapic.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/ioapic.c b/sys/arch/i386/i386/ioapic.c
index 3f51ed96645..e05befacaa3 100644
--- a/sys/arch/i386/i386/ioapic.c
+++ b/sys/arch/i386/i386/ioapic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ioapic.c,v 1.34 2014/12/09 06:58:28 doug Exp $ */
+/* $OpenBSD: ioapic.c,v 1.35 2015/04/29 04:29:23 jsg Exp $ */
/* $NetBSD: ioapic.c,v 1.7 2003/07/14 22:32:40 lukem Exp $ */
/*-
@@ -784,13 +784,14 @@ apic_intr_disestablish(void *arg)
unsigned int ioapic = APIC_IRQ_APIC(irq);
unsigned int intr = APIC_IRQ_PIN(irq);
struct ioapic_softc *sc = ioapic_find(ioapic);
- struct ioapic_pin *pin = &sc->sc_pins[intr];
+ struct ioapic_pin *pin;
struct intrhand **p, *q;
int minlevel, maxlevel;
extern void intr_calculatemasks(void); /* XXX */
if (sc == NULL)
panic("apic_intr_disestablish: unknown ioapic %d", ioapic);
+ pin = &sc->sc_pins[intr];
if (intr >= sc->sc_apic_sz)
panic("apic_intr_disestablish: bogus irq");