summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_pcib_acpi.c
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2013-07-05 05:47:10 +0000
committergrehan <grehan@FreeBSD.org>2013-07-05 05:47:10 +0000
commit6a7baaf83640e0eaa135d2f7a3c1d4401f1683bf (patch)
tree83ae82cf8f72af4b819f49aa52acdd97f74c6328 /sys/dev/acpica/acpi_pcib_acpi.c
parent2cb5a953f0a60811764ccaca7c37b51ff007c711 (diff)
parent8e6b84b998690dcfc1a4957dc7a483ac5b600db8 (diff)
downloadFreeBSD-src-6a7baaf83640e0eaa135d2f7a3c1d4401f1683bf.zip
FreeBSD-src-6a7baaf83640e0eaa135d2f7a3c1d4401f1683bf.tar.gz
IFC @ r252763
Diffstat (limited to 'sys/dev/acpica/acpi_pcib_acpi.c')
-rw-r--r--sys/dev/acpica/acpi_pcib_acpi.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c
index 36d9580..882834d 100644
--- a/sys/dev/acpica/acpi_pcib_acpi.c
+++ b/sys/dev/acpica/acpi_pcib_acpi.c
@@ -287,6 +287,12 @@ acpi_pcib_acpi_attach(device_t dev)
sc->ap_handle = acpi_get_handle(dev);
/*
+ * Don't attach if we're not really there.
+ */
+ if (!acpi_DeviceIsPresent(dev))
+ return (ENXIO);
+
+ /*
* Get our segment number by evaluating _SEG.
* It's OK for this to not exist.
*/
@@ -353,7 +359,7 @@ acpi_pcib_acpi_attach(device_t dev)
if (status != AE_NOT_FOUND) {
device_printf(dev, "could not evaluate _BBN - %s\n",
AcpiFormatException(status));
- return_VALUE (ENXIO);
+ return (ENXIO);
} else {
/* If it's not found, assume 0. */
sc->ap_bus = 0;
OpenPOWER on IntegriCloud