Skip to content

Commit

Permalink
PCI: endpoint: pci-epf-vntb: Fix call pci_epc_mem_free_addr() in erro…
Browse files Browse the repository at this point in the history
…r path

[ Upstream commit 0c03126 ]

Replace pci_epc_mem_free_addr() with pci_epf_free_space() in the
error handle path to match pci_epf_alloc_space().

Link: https://lore.kernel.org/r/20221102141014.1025893-4-Frank.Li@nxp.com
Fixes: e35f56b ("PCI: endpoint: Support NTB transfer between RC and EP")
Signed-off-by: Frank Li <frank.li@nxp.com>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
nxpfrankli authored and gregkh committed Dec 31, 2022
1 parent eef5d05 commit 21d8b6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/endpoint/functions/pci-epf-vntb.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ static int epf_ntb_db_bar_init(struct epf_ntb *ntb)
return ret;

err_alloc_peer_mem:
pci_epc_mem_free_addr(ntb->epf->epc, epf_bar->phys_addr, mw_addr, epf_bar->size);
pci_epf_free_space(ntb->epf, mw_addr, barno, 0);
return -1;
}

Expand Down

0 comments on commit 21d8b6b

Please sign in to comment.