diff options
-rw-r--r-- | sys/dev/re/if_re.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index 995fa53..0844a885 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -1753,8 +1753,12 @@ re_detach(device_t dev) bus_teardown_intr(dev, sc->rl_irq[0], sc->rl_intrhand[0]); sc->rl_intrhand[0] = NULL; } - if (ifp != NULL) + if (ifp != NULL) { +#ifdef DEV_NETMAP + netmap_detach(ifp); +#endif /* DEV_NETMAP */ if_free(ifp); + } if ((sc->rl_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) == 0) rid = 0; else @@ -1843,9 +1847,6 @@ re_detach(device_t dev) bus_dma_tag_destroy(sc->rl_ldata.rl_stag); } -#ifdef DEV_NETMAP - netmap_detach(ifp); -#endif /* DEV_NETMAP */ if (sc->rl_parent_tag) bus_dma_tag_destroy(sc->rl_parent_tag); |