diff options
author | imp <imp@FreeBSD.org> | 2008-08-23 07:41:21 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2008-08-23 07:41:21 +0000 |
commit | 8d9d4a6dea7fe8ebdcb514b5a960e2a1e3cf46dd (patch) | |
tree | 55cff2dfd92d7f78bd4af35d86d45dcc9e07d44d | |
parent | ea74865077bcecee86c866aaedeac929ce99b1fd (diff) | |
download | FreeBSD-src-8d9d4a6dea7fe8ebdcb514b5a960e2a1e3cf46dd.zip FreeBSD-src-8d9d4a6dea7fe8ebdcb514b5a960e2a1e3cf46dd.tar.gz |
Handle errors in device_get_children gracefully.
-rw-r--r-- | sys/dev/sis/if_sis.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/sis/if_sis.c b/sys/dev/sis/if_sis.c index e5292eb..5c82cc1 100644 --- a/sys/dev/sis/if_sis.c +++ b/sys/dev/sis/if_sis.c @@ -348,7 +348,8 @@ sis_find_bridge(device_t dev) for (i = 0, busp = pci_devices; i < pci_count; i++, busp++) { pci_childcount = 0; - device_get_children(*busp, &pci_children, &pci_childcount); + if (device_get_children(*busp, &pci_children, &pci_childcount)) + break; for (j = 0, childp = pci_children; j < pci_childcount; j++, childp++) { if (pci_get_vendor(*childp) == SIS_VENDORID && |