diff options
-rw-r--r-- | sys/dev/acpica/Osd/OsdInterrupt.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/acpica/Osd/OsdInterrupt.c b/sys/dev/acpica/Osd/OsdInterrupt.c index e6443ca..c45564f 100644 --- a/sys/dev/acpica/Osd/OsdInterrupt.c +++ b/sys/dev/acpica/Osd/OsdInterrupt.c @@ -57,6 +57,11 @@ AcpiOsInstallInterruptHandler(UINT32 InterruptNumber, OSD_HANDLER ServiceRoutine FUNCTION_TRACE(__func__); + if ((sc = devclass_get_softc(acpi_devclass, 0)) == NULL) + panic("can't find ACPI device to register interrupt"); + if (sc->acpi_dev == NULL) + panic("acpi softc has invalid device"); + if ((InterruptNumber < 0) || (InterruptNumber > 255)) return_ACPI_STATUS(AE_BAD_PARAMETER); if (ServiceRoutine == NULL) @@ -67,11 +72,6 @@ AcpiOsInstallInterruptHandler(UINT32 InterruptNumber, OSD_HANDLER ServiceRoutine } InterruptHandler = ServiceRoutine; - if ((sc = devclass_get_softc(acpi_devclass, 0)) == NULL) - panic("can't find ACPI device to register interrupt"); - if (sc->acpi_dev == NULL) - panic("acpi softc has invalid device"); - /* * This isn't strictly true, as we ought to be able to handle > 1 interrupt. The ACPI * spec doesn't call for this though. |