aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hpet.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/hpet.c')
-rw-r--r--drivers/char/hpet.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index dfd7876f127c..fe6d4be48296 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -816,7 +816,7 @@ static unsigned long __hpet_calibrate(struct hpets *hpetp)
816 816
817static unsigned long hpet_calibrate(struct hpets *hpetp) 817static unsigned long hpet_calibrate(struct hpets *hpetp)
818{ 818{
819 unsigned long ret = -1; 819 unsigned long ret = ~0UL;
820 unsigned long tmp; 820 unsigned long tmp;
821 821
822 /* 822 /*
@@ -1001,6 +1001,9 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data)
1001 irqp = &res->data.extended_irq; 1001 irqp = &res->data.extended_irq;
1002 1002
1003 for (i = 0; i < irqp->interrupt_count; i++) { 1003 for (i = 0; i < irqp->interrupt_count; i++) {
1004 if (hdp->hd_nirqs >= HPET_MAX_TIMERS)
1005 break;
1006
1004 irq = acpi_register_gsi(NULL, irqp->interrupts[i], 1007 irq = acpi_register_gsi(NULL, irqp->interrupts[i],
1005 irqp->triggering, irqp->polarity); 1008 irqp->triggering, irqp->polarity);
1006 if (irq < 0) 1009 if (irq < 0)