]> err.no Git - linux-2.6/commitdiff
[ACPI] acpi_pci_enable_irq() now checks for acpi_register_gsi() errors
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Thu, 28 Jul 2005 18:42:00 +0000 (14:42 -0400)
committerLen Brown <len.brown@intel.com>
Fri, 5 Aug 2005 02:15:06 +0000 (22:15 -0400)
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/pci_irq.c

index c536ccfc54136529919b7159b416c7c7ec271417..7ed4b2ef265f10acb7c8636784a6066df1524009 100644 (file)
@@ -424,6 +424,7 @@ acpi_pci_irq_enable (
        int                     edge_level = ACPI_LEVEL_SENSITIVE;
        int                     active_high_low = ACPI_ACTIVE_LOW;
        char                    *link = NULL;
+       int                     rc;
 
        ACPI_FUNCTION_TRACE("acpi_pci_irq_enable");
 
@@ -475,7 +476,13 @@ acpi_pci_irq_enable (
                }
        }
 
-       dev->irq = acpi_register_gsi(irq, edge_level, active_high_low);
+       rc = acpi_register_gsi(irq, edge_level, active_high_low);
+       if (rc < 0) {
+               printk(KERN_WARNING PREFIX "PCI Interrupt %s[%c]: failed "
+                      "to register GSI\n", pci_name(dev), ('A' + pin));
+               return_VALUE(rc);
+       }
+       dev->irq = rc;
 
        printk(KERN_INFO PREFIX "PCI Interrupt %s[%c] -> ",
                pci_name(dev), 'A' + pin);