[ACPI] Merge acpi-2.6.12 branch into 2.6.13-rc3
[linux-3.10.git] / drivers / char / hpet.c
index 762fa430fb5be3b6a7615eed705e741509475ba7..97feb7f7024d83e4180ba2477f89f7fa59445b5f 100644 (file)
@@ -906,11 +906,15 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
                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;
+                       }
                }
        }