summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwl8k.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2009-08-24 15:42:46 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-08-28 20:40:42 +0200
commit39a1e42eb4d0a2bc3f1211e9012bd23734ab86db (patch)
tree10c16139c5ab4829565a47c2b031756ca464916e /drivers/net/wireless/mwl8k.c
parentmwl8k: fix inverted error test in mwl8k_bss_info_changed() (diff)
downloadlinux-39a1e42eb4d0a2bc3f1211e9012bd23734ab86db.tar.xz
linux-39a1e42eb4d0a2bc3f1211e9012bd23734ab86db.zip
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)
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);