diff options
| author | Tong Zhang <ztong0001@gmail.com> | 2022-03-31 18:16:55 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2022-03-31 19:54:56 +0000 |
| commit | 2108cc72906f274f30306570268434c4f8d23636 (patch) | |
| tree | 629270b10513c15d4274f297eaadcfcd5b097d50 /sys/dev/stge | |
| parent | 31190aa02eef05b1b58ba89212dc8c8738770e37 (diff) | |
Diffstat (limited to 'sys/dev/stge')
| -rw-r--r-- | sys/dev/stge/if_stge.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/stge/if_stge.c b/sys/dev/stge/if_stge.c index c9f71f01278c..a043ca9a6e80 100644 --- a/sys/dev/stge/if_stge.c +++ b/sys/dev/stge/if_stge.c @@ -699,7 +699,9 @@ stge_detach(device_t dev) bus_teardown_intr(dev, sc->sc_res[1], sc->sc_ih); sc->sc_ih = NULL; } - bus_release_resources(dev, sc->sc_spec, sc->sc_res); + + if (sc->sc_spec) + bus_release_resources(dev, sc->sc_spec, sc->sc_res); mtx_destroy(&sc->sc_mii_mtx); mtx_destroy(&sc->sc_mtx); |
