Skip to content

Commit

Permalink
mwl8k: fix pci dma mapping leak in mwl8k_post_cmd() error path
Browse files Browse the repository at this point in the history
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Lennert Buytenhek authored and John W. Linville committed Aug 28, 2009
1 parent 942457d commit 39a1e42
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/wireless/mwl8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 39a1e42

Please sign in to comment.