diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-12-23 02:17:07 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-12-23 02:17:18 +0100 |
commit | 687ade3e4e55ecc26f89190b9dd35a3179fdc485 (patch) | |
tree | 21999f134c46048ae1809becb77952c8d056dbc9 | |
parent | 48e1c56161d40e0fb761f11a7c076553886fb7e4 (diff) | |
download | hurd-687ade3e4e55ecc26f89190b9dd35a3179fdc485.tar.gz hurd-687ade3e4e55ecc26f89190b9dd35a3179fdc485.tar.bz2 hurd-687ade3e4e55ecc26f89190b9dd35a3179fdc485.zip |
acpi: Look out for acpi_get_irq_number errors
Otherwise we would take the error as irq number.
-rw-r--r-- | acpi/acpi-ops.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/acpi/acpi-ops.c b/acpi/acpi-ops.c index 1aaec10c..47f7e3d2 100644 --- a/acpi/acpi-ops.c +++ b/acpi/acpi-ops.c @@ -73,6 +73,7 @@ S_acpi_get_pci_irq (struct protid *master, int *irq) { error_t err; + int ret; if (!master) return EOPNOTSUPP; @@ -81,6 +82,10 @@ S_acpi_get_pci_irq (struct protid *master, if (err) return err; - *irq = acpi_get_irq_number(bus, dev, func); - return err; + ret = acpi_get_irq_number(bus, dev, func); + if (ret < 0) + return -EIO; + + *irq = ret; + return 0; } |