summaryrefslogtreecommitdiff
path: root/sys/dev/cardbus
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2007-01-19 08:49:28 +0000
committerWarner Losh <imp@FreeBSD.org>2007-01-19 08:49:28 +0000
commit7e2ff8bbff073b8f2d10ad9d4f1929e66f16395d (patch)
tree5104fd2584e9b529061f591e8346b1d6c59b7476 /sys/dev/cardbus
parent64b4073914d0f31e2148082f816f281c3522f6ee (diff)
Notes
Diffstat (limited to 'sys/dev/cardbus')
-rw-r--r--sys/dev/cardbus/cardbus.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/cardbus/cardbus.c b/sys/dev/cardbus/cardbus.c
index 2e3453eaccb7..bd2b31c591ab 100644
--- a/sys/dev/cardbus/cardbus.c
+++ b/sys/dev/cardbus/cardbus.c
@@ -217,7 +217,8 @@ cardbus_detach_card(device_t cbdev)
int tmp;
int err = 0;
- device_get_children(cbdev, &devlist, &numdevs);
+ if (device_get_children(cbdev, &devlist, &numdevs) != 0)
+ return (ENOENT);
if (numdevs == 0) {
free(devlist, M_TEMP);
@@ -251,7 +252,9 @@ cardbus_driver_added(device_t cbdev, driver_t *driver)
struct cardbus_devinfo *dinfo;
DEVICE_IDENTIFY(driver, cbdev);
- device_get_children(cbdev, &devlist, &numdevs);
+ if (device_get_children(cbdev, &devlist, &numdevs) != 0)
+ return;
+
/*
* If there are no drivers attached, but there are children,
* then power the card up.