device_delete_child should be destroying the child, not the dev

MFC After: 1 week
Reviewed by: imp, kib
Pull Request: https://github.com/freebsd/freebsd-src/pull/1934
This commit is contained in:
AZero13 2025-12-17 21:09:31 -05:00 committed by Warner Losh
parent 9cdb2eb668
commit 930a1341d6

View file

@ -1557,7 +1557,7 @@ device_delete_child(device_t dev, device_t child)
return (error);
}
device_destroy_props(dev);
device_destroy_props(child);
if (child->devclass)
devclass_delete_device(child->devclass, child);
if (child->parent)