diff options
-rw-r--r-- | sys/dev/fxp/if_fxp.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index f61f507..a6f9004 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -855,9 +855,6 @@ fxp_release(struct fxp_softc *sc) bus_dmamap_destroy(sc->fxp_mtag, rxp->rx_map); } bus_dmamap_destroy(sc->fxp_mtag, sc->spare_map); - bus_dma_tag_destroy(sc->fxp_mtag); - } - if (sc->fxp_stag) { for (i = 0; i < FXP_NTXCB; i++) { txp = &sc->fxp_desc.tx_list[i]; if (txp->tx_mbuf != NULL) { @@ -868,8 +865,10 @@ fxp_release(struct fxp_softc *sc) } bus_dmamap_destroy(sc->fxp_mtag, txp->tx_map); } - bus_dma_tag_destroy(sc->fxp_stag); + bus_dma_tag_destroy(sc->fxp_mtag); } + if (sc->fxp_stag) + bus_dma_tag_destroy(sc->fxp_stag); if (sc->cbl_tag) bus_dma_tag_destroy(sc->cbl_tag); if (sc->mcs_tag) |