aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/puc
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2025-01-02 18:25:38 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2025-01-02 18:25:38 +0000
commit925e1016b163701268a4298d1eca4b2484a81526 (patch)
treeada1177200d398c43adb9eb8b63f02bc512fe40d /sys/dev/puc
parentd174ffca3a79171069cb041f81c2680a6e4809ed (diff)
Diffstat (limited to 'sys/dev/puc')
-rw-r--r--sys/dev/puc/puc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/puc/puc.c b/sys/dev/puc/puc.c
index e10d0374c7de..d55fdf63e70b 100644
--- a/sys/dev/puc/puc.c
+++ b/sys/dev/puc/puc.c
@@ -373,10 +373,9 @@ puc_bfe_attach(device_t dev)
return (0);
fail:
+ device_delete_children(dev);
for (idx = 0; idx < sc->sc_nports; idx++) {
port = &sc->sc_port[idx];
- if (port->p_dev != NULL)
- device_delete_child(dev, port->p_dev);
if (port->p_rres != NULL)
rman_release_resource(port->p_rres);
if (port->p_ires != NULL)