git: 20f932af2973 - main - bhnd bcma/siba: Remove duplicate call to device_delete_children

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Thu, 02 Jan 2025 18:28:29 UTC
The branch main has been updated by jhb:

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

commit 20f932af2973afc7624ac40a843b85b48a3947c7
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2025-01-02 18:24:13 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2025-01-02 18:24:13 +0000

    bhnd bcma/siba: Remove duplicate call to device_delete_children
    
    bcma/siba_add_children already call device_delete_children if an error
    occurs.
    
    Differential Revision:  https://reviews.freebsd.org/D47968
---
 sys/dev/bhnd/bcma/bcma.c | 1 -
 sys/dev/bhnd/siba/siba.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/sys/dev/bhnd/bcma/bcma.c b/sys/dev/bhnd/bcma/bcma.c
index 9ce4bf04a1c5..a83873b321c2 100644
--- a/sys/dev/bhnd/bcma/bcma.c
+++ b/sys/dev/bhnd/bcma/bcma.c
@@ -81,7 +81,6 @@ bcma_attach(device_t dev)
 
 	/* Enumerate children */
 	if ((error = bcma_add_children(dev))) {
-		device_delete_children(dev);
 		return (error);
 	}
 
diff --git a/sys/dev/bhnd/siba/siba.c b/sys/dev/bhnd/siba/siba.c
index ec9f22ff22af..a8e83f843506 100644
--- a/sys/dev/bhnd/siba/siba.c
+++ b/sys/dev/bhnd/siba/siba.c
@@ -85,7 +85,6 @@ siba_attach(device_t dev)
 
 	/* Enumerate children */
 	if ((error = siba_add_children(dev))) {
-		device_delete_children(dev);
 		SIBA_LOCK_DESTROY(sc);
 		return (error);
 	}