diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2025-01-02 18:25:12 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2025-01-02 18:25:12 +0000 |
| commit | 11a9117871e6037ae7b8011b243939322efce569 (patch) | |
| tree | 2a8fffe9baa328b7f236a3cba326f7155d5b7514 /sys/dev/amdpm | |
| parent | 0ac15e476d8732bd749768e3fb80e0075f5ad4c0 (diff) | |
Diffstat (limited to 'sys/dev/amdpm')
| -rw-r--r-- | sys/dev/amdpm/amdpm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/amdpm/amdpm.c b/sys/dev/amdpm/amdpm.c index 22b252f572b0..d744c0aa5d4b 100644 --- a/sys/dev/amdpm/amdpm.c +++ b/sys/dev/amdpm/amdpm.c @@ -229,11 +229,11 @@ static int amdpm_detach(device_t dev) { struct amdpm_softc *amdpm_sc = device_get_softc(dev); + int error; - if (amdpm_sc->smbus) { - device_delete_child(dev, amdpm_sc->smbus); - amdpm_sc->smbus = NULL; - } + error = bus_generic_detach(dev); + if (error != 0) + return (error); mtx_destroy(&amdpm_sc->lock); if (amdpm_sc->res) |
