mwl8k: Unmap the pci DMA address in xmit error path
authorNishant Sarmukadam <nishants@marvell.com>
Tue, 6 Nov 2012 13:52:48 +0000 (19:22 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 14 Nov 2012 19:56:09 +0000 (14:56 -0500)
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>
drivers/net/wireless/mwl8k.c

index 996176596e0201a79364e183be481876c3bed982..5b5b9ecbf1f90737b071052c26accd9aaa5aefd6 100644 (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;
                }