From d444cd5f28a2ec5417c571ca6244ede6dc3e7b22 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 23 Aug 2008 15:57:43 +0000 Subject: [PATCH] When device_get_children returns an error, ignore that bus' children. --- sys/dev/agp/agp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c index baff9a56a076..1dd8b3a547de 100644 --- a/sys/dev/agp/agp.c +++ b/sys/dev/agp/agp.c @@ -118,7 +118,8 @@ agp_find_display(void) bus = devclass_get_device(pci, busnum); if (!bus) continue; - device_get_children(bus, &kids, &numkids); + if (device_get_children(bus, &kids, &numkids) != 0) + continue; for (i = 0; i < numkids; i++) { dev = kids[i]; if (pci_get_class(dev) == PCIC_DISPLAY