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

[email-masked]
Subject: [ACPI] acpi_register_gsi-change-hpet-driver.patch added to -mm
tree

The patch titled

     acpi_register_gsi(): change hpet driver

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

     acpi_register_gsi-change-hpet-driver.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 hpet driver.

Signed-off-by: Kenji Kaneshige <[email-masked]>
Cc: <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
Index: to-akpm/drivers/char/hpet.c
===================================================================
--- to-akpm.orig/drivers/char/hpet.c
+++ to-akpm/drivers/char/hpet.c
@@ -906,11 +906,15 @@ static acpi_status hpet_resources(struct
 		if (irqp->number_of_interrupts > 0) {
 			hdp->hd_nirqs = irqp->number_of_interrupts;
 
-			for (i = 0; i < hdp->hd_nirqs; i++)
-				hdp->hd_irq[i] =
+			for (i = 0; i < hdp->hd_nirqs; i++) {
+				int rc =
 				    acpi_register_gsi(irqp->interrupts[i],
 						      irqp->edge_level,
 						      irqp->active_high_low);
+				if (rc < 0)
+					return AE_ERROR;
+				hdp->hd_irq[i] = rc;
+			}
 		}
 	}