linux/drivers/pci/endpoint
Jerome Brunet c63ca4d387 PCI: endpoint: pci-epf-vntb: Return -ENOENT if pci_epc_get_next_free_bar() fails
[ Upstream commit 7ea488cce7 ]

According the function documentation of epf_ntb_init_epc_bar(), the
function should return an error code on error. However, it returns -1 when
no BAR is available i.e., when pci_epc_get_next_free_bar() fails.

Return -ENOENT instead.

Fixes: e35f56bb03 ("PCI: endpoint: Support NTB transfer between RC and EP")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
[mani: changed err code to -ENOENT]
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20250603-pci-vntb-bar-mapping-v2-1-fc685a22ad28@baylibre.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-08-15 12:13:50 +02:00
..
functions PCI: endpoint: pci-epf-vntb: Return -ENOENT if pci_epc_get_next_free_bar() fails 2025-08-15 12:13:50 +02:00
Kconfig PCI: consolidate PCI config entry in drivers/pci 2018-11-23 11:45:34 +09:00
Makefile PCI: Add SPDX GPL-2.0 when no license was specified 2018-01-26 11:45:16 -06:00
pci-ep-cfs.c PCI: endpoint: Remove unused field in struct pci_epf_group 2024-05-28 11:13:48 -05:00
pci-epc-core.c PCI: endpoint: Destroy the EPC device in devm_pci_epc_destroy() 2025-02-08 09:57:52 +01:00
pci-epc-mem.c PCI: endpoint: Add kernel-doc for pci_epc_mem_init() API 2023-08-26 16:54:46 +00:00
pci-epf-core.c PCI: endpoint: Retain fixed-size BAR size as well as aligned size 2025-06-19 15:32:11 +02:00