Page MenuHomeFreeBSD

D8070.id20855.diff
No OneTemporary

D8070.id20855.diff

Index: sys/kern/subr_bus.c
===================================================================
--- sys/kern/subr_bus.c
+++ sys/kern/subr_bus.c
@@ -1949,15 +1949,17 @@
PDEBUG(("%s from %s", DEVICENAME(child), DEVICENAME(dev)));
- /* remove children first */
+ /* detach parent before deleting children, if any */
+ if ((error = device_detach(child)) != 0)
+ return (error);
+
+ /* remove children second */
while ((grandchild = TAILQ_FIRST(&child->children)) != NULL) {
error = device_delete_child(child, grandchild);
if (error)
return (error);
}
- if ((error = device_detach(child)) != 0)
- return (error);
if (child->devclass)
devclass_delete_device(child->devclass, child);
if (child->parent)

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 30, 2:23 PM (18 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14943655
Default Alt Text
D8070.id20855.diff (727 B)

Event Timeline