From: [email-masked] on behalf of [email-masked]
To: [email-masked]; [email-masked];

[email-masked]
Subject: [ACPI] acpi_register_gsi-change-acpi-pci-code.patch added to
-mm tree

The patch titled

     acpi_register_gsi(): change acpi pci code

has been added to the -mm tree.  Its filename is

     acpi_register_gsi-change-acpi-pci-code.patch

Patches currently in -mm which might be from [email-masked] are

acpi_register_gsi-change-acpi_register_gsi-interface.patch
acpi_register_gsi-change-acpi-pci-code.patch
acpi_register_gsi-change-hpet-driver.patch
acpi_register_gsi-change-phpacpi-driver.patch
acpi_register_gsi-change-acpi-based-8250-driver.patch
acpi_register_gsi-change-ia64-iosapic-code.patch

From: Kenji Kaneshige <[email-masked]>

This patch adds the error check of acpi_register_gsi() into
acpi_pci_enable_irq().

Signed-off-by: Kenji Kaneshige <[email-masked]>
Cc: <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
Index: to-akpm/drivers/acpi/pci_irq.c
===================================================================
--- to-akpm.orig/drivers/acpi/pci_irq.c
+++ to-akpm/drivers/acpi/pci_irq.c
@@ -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);