Don't free the descriptor allocation/map if it doesn't exist.

I missed this in my previous commit.
This commit is contained in:
Adrian Chadd 2012-07-14 02:47:16 +00:00
parent 2fe91baa92
commit 8d467c41b0

View File

@ -2956,10 +2956,12 @@ ath_descdma_cleanup(struct ath_softc *sc,
struct ath_buf *bf;
struct ieee80211_node *ni;
bus_dmamap_unload(dd->dd_dmat, dd->dd_dmamap);
bus_dmamem_free(dd->dd_dmat, dd->dd_desc, dd->dd_dmamap);
bus_dmamap_destroy(dd->dd_dmat, dd->dd_dmamap);
bus_dma_tag_destroy(dd->dd_dmat);
if (dd->dd_dmamap != 0) {
bus_dmamap_unload(dd->dd_dmat, dd->dd_dmamap);
bus_dmamem_free(dd->dd_dmat, dd->dd_desc, dd->dd_dmamap);
bus_dmamap_destroy(dd->dd_dmat, dd->dd_dmamap);
bus_dma_tag_destroy(dd->dd_dmat);
}
TAILQ_FOREACH(bf, head, bf_list) {
if (bf->bf_m) {