From a4e1d2d2cfde85b62e144af001a5b5fd57e777e5 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 23 Aug 2008 18:27:10 +0000 Subject: [PATCH] Make sure that we handle errors in device_get_children correctly. --- sys/dev/sound/pci/csa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/sound/pci/csa.c b/sys/dev/sound/pci/csa.c index 37a83c5b934c..14993724a7d3 100644 --- a/sys/dev/sound/pci/csa.c +++ b/sys/dev/sound/pci/csa.c @@ -123,7 +123,8 @@ clkrun_hack(int run) 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)) + continue; for (j = 0, childp = pci_children; j < pci_childcount; j++, childp++) { if (pci_get_vendor(*childp) == 0x8086 && pci_get_device(*childp) == 0x7113) { port = (pci_read_config(*childp, 0x41, 1) << 8) + 0x10;