Unload and destroy the TX DMA maps before destroying the DMA tag

they're attached to, not after.

Spotted by:	Coverity via sam
This commit is contained in:
Maxime Henrion 2005-03-16 16:39:04 +00:00
parent 0ce37001aa
commit c4bf1e9092

View File

@ -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)