Skip to content

Commit a89bca2

Browse files
andy-shevrafaeljw
authored andcommitted
ACPI / x86: boot: Propagate error code in acpi_gsi_to_irq()
acpi_get_override_irq() followed by acpi_register_gsi() returns negative error code on failure. Propagate it from acpi_gsi_to_irq() to callers. Signed-off-by: Andy Shevchenko <[email protected]> [ rjw : Subject/changelog ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 7c7bcfe commit a89bca2

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

arch/x86/kernel/acpi/boot.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -619,17 +619,17 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irqp)
619619
}
620620

621621
rc = acpi_get_override_irq(gsi, &trigger, &polarity);
622-
if (rc == 0) {
623-
trigger = trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE;
624-
polarity = polarity ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH;
625-
irq = acpi_register_gsi(NULL, gsi, trigger, polarity);
626-
if (irq >= 0) {
627-
*irqp = irq;
628-
return 0;
629-
}
630-
}
622+
if (rc)
623+
return rc;
631624

632-
return -1;
625+
trigger = trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE;
626+
polarity = polarity ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH;
627+
irq = acpi_register_gsi(NULL, gsi, trigger, polarity);
628+
if (irq < 0)
629+
return irq;
630+
631+
*irqp = irq;
632+
return 0;
633633
}
634634
EXPORT_SYMBOL_GPL(acpi_gsi_to_irq);
635635

0 commit comments

Comments
 (0)