Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39a1e42e authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by John W. Linville
Browse files

mwl8k: fix pci dma mapping leak in mwl8k_post_cmd() error path

parent 942457d6
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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);