diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2009-08-24 15:42:46 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-28 14:40:42 -0400 |
commit | 39a1e42eb4d0a2bc3f1211e9012bd23734ab86db (patch) | |
tree | 10c16139c5ab4829565a47c2b031756ca464916e | |
parent | 942457d63fedd08ce7330b89fc2934be02c3fecc (diff) |
mwl8k: fix pci dma mapping leak in mwl8k_post_cmd() error path
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 4d3353cb308..a4336f45f52 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c @@ -1439,8 +1439,11 @@ static int mwl8k_post_cmd(struct ieee80211_hw *hw, struct mwl8k_cmd_pkt *cmd) return -ENOMEM; rc = mwl8k_fw_lock(hw); - if (rc) + if (rc) { + pci_unmap_single(priv->pdev, dma_addr, dma_size, + PCI_DMA_BIDIRECTIONAL); return rc; + } priv->hostcmd_wait = &cmd_wait; iowrite32(dma_addr, regs + MWL8K_HIU_GEN_PTR); |