aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwl8k.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2009-08-24 09:42:46 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-28 14:40:42 -0400
commit39a1e42eb4d0a2bc3f1211e9012bd23734ab86db (patch)
tree10c16139c5ab4829565a47c2b031756ca464916e /drivers/net/wireless/mwl8k.c
parent942457d63fedd08ce7330b89fc2934be02c3fecc (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>
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r--drivers/net/wireless/mwl8k.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 4d3353cb308b..a4336f45f523 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)
1439 return -ENOMEM; 1439 return -ENOMEM;
1440 1440
1441 rc = mwl8k_fw_lock(hw); 1441 rc = mwl8k_fw_lock(hw);
1442 if (rc) 1442 if (rc) {
1443 pci_unmap_single(priv->pdev, dma_addr, dma_size,
1444 PCI_DMA_BIDIRECTIONAL);
1443 return rc; 1445 return rc;
1446 }
1444 1447
1445 priv->hostcmd_wait = &cmd_wait; 1448 priv->hostcmd_wait = &cmd_wait;
1446 iowrite32(dma_addr, regs + MWL8K_HIU_GEN_PTR); 1449 iowrite32(dma_addr, regs + MWL8K_HIU_GEN_PTR);