From 27547fa5853d5d47ce2aea6b224208b4a0dbf164 Mon Sep 17 00:00:00 2001 From: jsg Date: Wed, 29 Apr 2015 04:29:23 +0000 Subject: [PATCH] Move a variable's initialisation so a panic will work as intended. ok guenther@ deraadt@ --- sys/arch/i386/i386/ioapic.c | 5 +++-- 1 file 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"); -- 2.20.1