]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: endpoint: pci-epf-ntb: Remove duplicate resource teardown
authorKoichiro Den <den@valinux.co.jp>
Thu, 26 Feb 2026 08:41:39 +0000 (17:41 +0900)
committerManivannan Sadhasivam <mani@kernel.org>
Wed, 4 Mar 2026 06:39:49 +0000 (12:09 +0530)
commit3446beddba450c8d6f9aca2f028712ac527fead3
tree1feb60205e7894604211a781dc85bdefa8a6efce
parent0da63230d3ec1ec5fcc443a2314233e95bfece54
PCI: endpoint: pci-epf-ntb: Remove duplicate resource teardown

epf_ntb_epc_destroy() duplicates the teardown that the caller is
supposed to do later. This leads to an oops when .allow_link fails or
when .drop_link is performed. Remove the helper.

Also drop pci_epc_put(). EPC device refcounting is tied to configfs EPC
group lifetime, and pci_epc_put() in the .drop_link path is sufficient.

Fixes: 8b821cf76150 ("PCI: endpoint: Add EP function driver to provide NTB functionality")
Signed-off-by: Koichiro Den <den@valinux.co.jp>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260226084142.2226875-3-den@valinux.co.jp
drivers/pci/endpoint/functions/pci-epf-ntb.c