]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
PCI: endpoint: pci-epf-vntb: Return -ENOENT if pci_epc_get_next_free_bar() fails
authorJerome Brunet <jbrunet@baylibre.com>
Tue, 3 Jun 2025 17:03:38 +0000 (19:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 10:05:01 +0000 (12:05 +0200)
commitbf88b2b3fd5f3bc7a467858f313f81012cecdad3
treee55aebc14299397346562969e3dad9cf058a5da4
parent695beeafebbf1e5930efda9bb1eaa3858b1f3a83
PCI: endpoint: pci-epf-vntb: Return -ENOENT if pci_epc_get_next_free_bar() fails

[ Upstream commit 7ea488cce73263231662e426639dd3e836537068 ]

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: e35f56bb0330 ("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>
drivers/pci/endpoint/functions/pci-epf-vntb.c