Skip to content

Commit fd3cfeb

Browse files
committed
ACPI / hotplug / PCI: Drop WARN_ON() from acpiphp_enumerate_slots()
The WARN_ON() in acpiphp_enumerate_slots() triggers unnecessarily for devices whose bridges are going to be handled by native PCIe hotplug (pciehp) and the simplest way to prevent that from happening is to drop the WARN_ON(). References: https://bugzilla.kernel.org/show_bug.cgi?id=62831 Reported-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 5d44945 commit fd3cfeb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/pci/hotplug/acpiphp_glue.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -994,12 +994,13 @@ void acpiphp_enumerate_slots(struct pci_bus *bus)
994994

995995
/*
996996
* This bridge should have been registered as a hotplug function
997-
* under its parent, so the context has to be there. If not, we
998-
* are in deep goo.
997+
* under its parent, so the context should be there, unless the
998+
* parent is going to be handled by pciehp, in which case this
999+
* bridge is not interesting to us either.
9991000
*/
10001001
mutex_lock(&acpiphp_context_lock);
10011002
context = acpiphp_get_context(handle);
1002-
if (WARN_ON(!context)) {
1003+
if (!context) {
10031004
mutex_unlock(&acpiphp_context_lock);
10041005
put_device(&bus->dev);
10051006
pci_dev_put(bridge->pci_dev);

0 commit comments

Comments
 (0)