diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-10-20 17:31:15 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-10-20 17:31:15 +0200 |
commit | 9caa3a2de955238df742572812178568fed173f7 (patch) | |
tree | 7670fcf0c1a108590432ad7b68d8754648b6a6d3 /drivers/acpi | |
parent | d5921c460e543228d100daf67dac7a03dfaaa40a (diff) | |
parent | 0c21a18d5d6c6a73d098fb9b4701572370942df9 (diff) |
Merge branch 'acpi-irq'
Merge ACPI IRQ management fix for 6.6-rc7 (Sunil V L).
* acpi-irq:
ACPI: irq: Fix incorrect return value in acpi_register_gsi()
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/irq.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/acpi/irq.c b/drivers/acpi/irq.c index c2c786eb95ab..1687483ff319 100644 --- a/drivers/acpi/irq.c +++ b/drivers/acpi/irq.c @@ -57,6 +57,7 @@ int acpi_register_gsi(struct device *dev, u32 gsi, int trigger, int polarity) { struct irq_fwspec fwspec; + unsigned int irq; fwspec.fwnode = acpi_get_gsi_domain_id(gsi); if (WARN_ON(!fwspec.fwnode)) { @@ -68,7 +69,11 @@ int acpi_register_gsi(struct device *dev, u32 gsi, int trigger, fwspec.param[1] = acpi_dev_get_irq_type(trigger, polarity); fwspec.param_count = 2; - return irq_create_fwspec_mapping(&fwspec); + irq = irq_create_fwspec_mapping(&fwspec); + if (!irq) + return -EINVAL; + + return irq; } EXPORT_SYMBOL_GPL(acpi_register_gsi); |