Skip to contentSkip to conversation

mwl8k: Unmap the pci DMA address in xmit error path

PATCH New Nishant Sarmukadam 1 participant 1 message Nov 6, 2012 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/wireless/mwl8k.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/net/wireless/mwl8k.c +2 -0
index 9961765..5b5b9ec 100644
@@ -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;
 		}
Signature · 1 line
1.7.9.2