DF-5544 / fix.diff
--- a/sys/bus/u4b/controller/uhci_pci.c +++ b/sys/bus/u4b/controller/uhci_pci.c @@ -370,8 +370,15 @@ { uhci_softc_t *sc = device_get_softc(self); + int error; + /* during module unload there are lots of children leftover */ - device_delete_children(self); + error = device_delete_children(self); + if (error != 0) { + device_printf(self, "child device failed to detach (%d); " + "refusing controller teardown\n", error); + return (error); + } /* * disable interrupts that might have been switched on in |