Skip to content

Commit 0c03126

Browse files
nxpfrankliLorenzo Pieralisi
authored andcommitted
PCI: endpoint: pci-epf-vntb: Fix call pci_epc_mem_free_addr() in error path
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/[email protected] Fixes: e35f56b ("PCI: endpoint: Support NTB transfer between RC and EP") Signed-off-by: Frank Li <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]>
1 parent 1d118fe commit 0c03126

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/endpoint/functions/pci-epf-vntb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ static int epf_ntb_db_bar_init(struct epf_ntb *ntb)
571571
return ret;
572572

573573
err_alloc_peer_mem:
574-
pci_epc_mem_free_addr(ntb->epf->epc, epf_bar->phys_addr, mw_addr, epf_bar->size);
574+
pci_epf_free_space(ntb->epf, mw_addr, barno, 0);
575575
return -1;
576576
}
577577

0 commit comments

Comments
 (0)