[PATCH 1/2] PCI: of: Correct pci_set_of_node() return value documentation

From: Xilin Wu

Date: Fri Oct 09 2026 - 03:31:14 EST


Commit 1a8c251cff20 ("PCI: move OF status = "disabled" detection to
dev->match_driver") removed the availability check from pci_set_of_node().
The function now returns 0 even when the device is disabled in the device
tree, but its kernel-doc still says that it can return -ENODEV.

Remove the stale -ENODEV description and use the kernel-doc Return:
heading for the return value.

Signed-off-by: Xilin Wu <sophon@xxxxxxxxx>
---
drivers/pci/of.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/of.c b/drivers/pci/of.c
index a51dff91b196..9e82c79be3d8 100644
--- a/drivers/pci/of.c
+++ b/drivers/pci/of.c
@@ -24,8 +24,8 @@
* pci_set_of_node - Find and set device's DT device_node
* @dev: the PCI device structure to fill
*
- * Returns 0 on success with of_node set or when no device is described in the
- * DT. Returns -ENODEV if the device is present, but disabled in the DT.
+ * Return: 0 on success with of_node set or when no device is described in the
+ * DT.
*/
int pci_set_of_node(struct pci_dev *dev)
{

--
2.56.0