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

Signed-off-by: Kenji Kaneshige <[EMAIL PROTECTED]>


---

 linux-2.6.13-rc3-kanesige/drivers/char/hpet.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff -puN drivers/char/hpet.c~handle-error-acpi_register_gsi-hpet 
drivers/char/hpet.c
--- linux-2.6.13-rc3/drivers/char/hpet.c~handle-error-acpi_register_gsi-hpet    
2005-07-28 01:01:16.000000000 +0900
+++ linux-2.6.13-rc3-kanesige/drivers/char/hpet.c       2005-07-28 
01:01:16.000000000 +0900
@@ -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;
+                       }
                }
        }
 

_

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to