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 <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Nishant Sarmukadam 2012-11-06 19:22:48 +05:30 committed by John W. Linville
parent fd712f5f5e
commit ff7aa96f66

View file

@ -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;
}