[PATCH v2 0/5] PCI: hotplug: Check pci_hp_add_bridge() return value
From: Fahmy Hassan
Date: Tue Sep 08 2026 - 22:23:28 EST
This is v2 of a fix originally sent as a single-driver patch against
cpqphp. Bjorn pointed out that pci_hp_add_bridge() is called unchecked
by four other hotplug drivers too, and asked that this be reviewed as
one series rather than driver by driver, so v2 expands the fix to
cover all five callers: cpqphp, cpcihp, ibmphp, pciehp, and shpchp.
Each patch checks the return value and logs via that driver's own
existing error macro, and removes the corresponding now-resolved TODO
entry where one existed.
v1 -> v2:
- Expanded from a single cpqphp patch to all five drivers that call
pci_hp_add_bridge(), per Bjorn's review.
- Fixed the TODO removal that was missing from the v1 patch email
(a stale archived patch file on my end, not a dropped hunk).
- Reworded the commit messages: pci_hp_add_bridge() already logs one
of its two failure paths (no bus number available) via pci_err();
only the other path (subordinate bus not created after scanning)
was actually unreported. v1's message overstated this as
"completely unreported".
Fahmy Hassan (5):
PCI: cpqphp: Check pci_hp_add_bridge() return value
PCI: cpcihp: Check pci_hp_add_bridge() return value
PCI: ibmphp: Check pci_hp_add_bridge() return value
PCI: pciehp: Check pci_hp_add_bridge() return value
PCI: shpchp: Check pci_hp_add_bridge() return value
drivers/pci/hotplug/TODO | 8 --------
drivers/pci/hotplug/cpci_hotplug_pci.c | 5 +++--
drivers/pci/hotplug/cpqphp_pci.c | 4 +++-
drivers/pci/hotplug/ibmphp_core.c | 3 ++-
drivers/pci/hotplug/pciehp_pci.c | 3 ++-
drivers/pci/hotplug/shpchp_pci.c | 5 +++--
6 files changed, 13 insertions(+), 15 deletions(-)
--
2.53.0