Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: hotplug: Document unchecked return value of pci_hp_add_bridge()

Some hotplug drivers do not check the return value of pci_hp_add_bridge().
This may be problematic if the driver proceeds after pci_hp_add_bridge()
fails.

Link: https://lore.kernel.org/r/16a2442ea6ee896987a44df3ed509e4cfde44475.1714762038.git.namcao@linutronix.de
Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

authored by

Nam Cao and committed by
Bjorn Helgaas
e6e9a9a4 4cece764

+6
+6
drivers/pci/hotplug/TODO
··· 6 6 ->set_power callbacks in struct cpci_hp_controller_ops. Why were they 7 7 introduced? Can they be removed from the struct? 8 8 9 + * Returned code from pci_hp_add_bridge() is not checked. 10 + 9 11 cpqphp: 10 12 11 13 * The driver spawns a kthread cpqhp_event_thread() which is woken by the ··· 17 15 18 16 * A large portion of cpqphp_ctrl.c and cpqphp_pci.c concerns resource 19 17 management. Doesn't this duplicate functionality in the core? 18 + 19 + * Returned code from pci_hp_add_bridge() is not checked. 20 20 21 21 ibmphp: 22 22 ··· 46 42 47 43 * A large portion of ibmphp_res.c and ibmphp_pci.c concerns resource 48 44 management. Doesn't this duplicate functionality in the core? 45 + 46 + * Returned code from pci_hp_add_bridge() is not checked. 49 47 50 48 sgi_hotplug: 51 49