git: cc057040ad42 - stable/15 - device_delete_child should be destroying the child, not the dev

From: Warner Losh <imp_at_FreeBSD.org>
Date: Fri, 16 Jan 2026 15:13:09 UTC
The branch stable/15 has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=cc057040ad424d56e3aa142f71d0969e18187789

commit cc057040ad424d56e3aa142f71d0969e18187789
Author:     AZero13 <gfunni234@gmail.com>
AuthorDate: 2025-12-18 02:09:31 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2026-01-16 14:32:12 +0000

    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
    
    (cherry picked from commit 930a1341d62ccc4be969c2261e3abaf0c0573a9f)
---
 sys/kern/subr_bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
index 755d7d41899f..1001aab2dc54 100644
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -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)