diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2009-04-13 12:26:34 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-04-22 16:54:46 -0400 |
commit | 675902ef822c114c0dac17ed10eed43eb8f5c9ec (patch) | |
tree | 87958b08f6161fc9e1bb64abeae86f3253fcf48e | |
parent | d2f5b3a6778ae86fd93cb01ccac16aa0b079e441 (diff) |
ath9k: Fix memleak on TX DMA failure
The driver-specific region has to be freed in case
of a DMA mapping failure.
Cc: stable@kernel.org
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 628b780d8844..faf2cab49ea3 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -1572,8 +1572,9 @@ static int ath_tx_setup_buffer(struct ieee80211_hw *hw, struct ath_buf *bf, | |||
1572 | skb->len, DMA_TO_DEVICE); | 1572 | skb->len, DMA_TO_DEVICE); |
1573 | if (unlikely(dma_mapping_error(sc->dev, bf->bf_dmacontext))) { | 1573 | if (unlikely(dma_mapping_error(sc->dev, bf->bf_dmacontext))) { |
1574 | bf->bf_mpdu = NULL; | 1574 | bf->bf_mpdu = NULL; |
1575 | DPRINTF(sc, ATH_DBG_CONFIG, | 1575 | kfree(tx_info_priv); |
1576 | "dma_mapping_error() on TX\n"); | 1576 | tx_info->rate_driver_data[0] = NULL; |
1577 | DPRINTF(sc, ATH_DBG_FATAL, "dma_mapping_error() on TX\n"); | ||
1577 | return -ENOMEM; | 1578 | return -ENOMEM; |
1578 | } | 1579 | } |
1579 | 1580 | ||