git: 919f911ea452 - main - siba: Use device_delete_children in siba_add_children

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

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

commit 919f911ea4523276b7863e32e89943f270d3a76b
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2025-01-02 18:23:54 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2025-01-02 18:23:54 +0000

    siba: Use device_delete_children in siba_add_children
    
    Differential Revision:  https://reviews.freebsd.org/D47967
---
 sys/dev/bhnd/siba/siba.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/sys/dev/bhnd/siba/siba.c b/sys/dev/bhnd/siba/siba.c
index e693481f0819..ec9f22ff22af 100644
--- a/sys/dev/bhnd/siba/siba.c
+++ b/sys/dev/bhnd/siba/siba.c
@@ -1373,12 +1373,7 @@ siba_add_children(device_t dev)
 	return (0);
 
 failed:
-	for (u_int i = 0; i < cid->ncores; i++) {
-		if (children[i] == NULL)
-			continue;
-
-		device_delete_child(dev, children[i]);
-	}
+	device_delete_children(dev);
 
 	free(cores, M_BHND);
 	free(children, M_BHND);