From owner-svn-src-head@FreeBSD.ORG Sat Jul 14 02:47:16 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2FD4106566B; Sat, 14 Jul 2012 02:47:16 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE5AA8FC16; Sat, 14 Jul 2012 02:47:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6E2lG7D003936; Sat, 14 Jul 2012 02:47:16 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6E2lGRd003934; Sat, 14 Jul 2012 02:47:16 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201207140247.q6E2lGRd003934@svn.freebsd.org> From: Adrian Chadd Date: Sat, 14 Jul 2012 02:47:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238435 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2012 02:47:17 -0000 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) {