mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 06:26:48 +07:00
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>
This commit is contained in:
parent
942457d63f
commit
39a1e42eb4
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user