Date: Sat, 14 Jul 2012 02:47:16 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r238435 - head/sys/dev/ath Message-ID: <201207140247.q6E2lGRd003934@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Sat Jul 14 02:47:16 2012 New Revision: 238435 URL: http://svn.freebsd.org/changeset/base/238435 Log: Don't free the descriptor allocation/map if it doesn't exist. I missed this in my previous commit. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sat Jul 14 02:45:44 2012 (r238434) +++ head/sys/dev/ath/if_ath.c Sat Jul 14 02:47:16 2012 (r238435) @@ -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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207140247.q6E2lGRd003934>