From: Nishant Sarmukadam Date: Tue, 6 Nov 2012 13:52:48 +0000 (+0530) Subject: mwl8k: Unmap the pci DMA address in xmit error path X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ff7aa96f669d81b51339f7a0faf7ca37ed841ef1;p=linux-beck.git mwl8k: Unmap the pci DMA address in xmit error path We should unmap the DMA address in the error path, else it causes resource leaks. Fix this. Signed-off-by: Nishant Sarmukadam Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 996176596e02..5b5b9ecbf1f9 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c @@ -2005,6 +2005,8 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, spin_unlock(&priv->stream_lock); } spin_unlock_bh(&priv->tx_lock); + pci_unmap_single(priv->pdev, dma, skb->len, + PCI_DMA_TODEVICE); dev_kfree_skb(skb); return; }