summaryrefslogtreecommitdiffstats
path: root/sys/dev/puc/puc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/puc/puc.c')
-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 d3b14fb..3d3c3fa 100644
--- a/sys/dev/puc/puc.c
+++ b/sys/dev/puc/puc.c
@@ -414,8 +414,7 @@ puc_bfe_detach(device_t dev)
port = &sc->sc_port[idx];
if (port->p_dev == NULL)
continue;
- if (device_detach(port->p_dev) == 0) {
- device_delete_child(dev, port->p_dev);
+ if (device_delete_child(dev, port->p_dev) == 0) {
if (port->p_rres != NULL)
rman_release_resource(port->p_rres);
if (port->p_ires != NULL)
OpenPOWER on IntegriCloud