Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 2/4] mwl8k: fix pci dma mapping leak in mwl8k_post_cmd() error path
@ 2009-08-24 13:42 Lennert Buytenhek
  0 siblings, 0 replies; only message in thread
From: Lennert Buytenhek @ 2009-08-24 13:42 UTC (permalink / raw)
  To: linville, linux-wireless

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
---
 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 4d3353c..a4336f4 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);
-- 
1.5.6.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-08-24 13:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-24 13:42 [PATCH 2/4] mwl8k: fix pci dma mapping leak in mwl8k_post_cmd() error path Lennert Buytenhek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox