[RFC PATCH v2 08/21] ACPI: pci_irq: Avoid warning for deferred probe in acpi_pci_irq_enable()

Sunil V L
2023-10-25T20:25:02Z

When the architecture like RISC-V supports deferred GSI interrupt
controller probe, acpi_register_gsi() can return -EPROBE_DEFER which is
a valid use case to delay the dependent driver probe. So, avoid printing
the warning for the deferred probe case.

Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
---
drivers/acpi/pci_irq.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index ff30ceca2203..f7d0822da08f 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -452,8 +452,11 @@ int acpi_pci_irq_enable(struct pci_dev *dev)

rc = acpi_register_gsi(&dev->dev, gsi, triggering, polarity);
if (rc < 0) {
- dev_warn(&dev->dev, "PCI INT %c: failed to register GSI\n",
- pin_name(pin));
+ if (rc != -EPROBE_DEFER) {
+ dev_warn(&dev->dev, "PCI INT %c: failed to register GSI\n",
+ pin_name(pin));
+ }
+
kfree(entry);
return rc;
}
--
2.39.2