]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ACPI: irq: Fix incorrect return value in acpi_register_gsi()
authorSunil V L <sunilvl@ventanamicro.com>
Mon, 16 Oct 2023 17:09:39 +0000 (22:39 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Oct 2023 10:03:14 +0000 (12:03 +0200)
commit8d69b47443e8119d03a6e4f0bfcbf33f83e755a4
tree3e82980ff6d418310e46236fc81322ffcd949d73
parentc462bf4ef88a09f64e20e186292032e65966c796
ACPI: irq: Fix incorrect return value in acpi_register_gsi()

commit 0c21a18d5d6c6a73d098fb9b4701572370942df9 upstream.

acpi_register_gsi() should return a negative value in case of failure.

Currently, it returns the return value from irq_create_fwspec_mapping().
However, irq_create_fwspec_mapping() returns 0 for failure. Fix the
issue by returning -EINVAL if irq_create_fwspec_mapping() returns zero.

Fixes: d44fa3d46079 ("ACPI: Add support for ResourceSource/IRQ domain mapping")
Cc: 4.11+ <stable@vger.kernel.org> # 4.11+
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
[ rjw: Rename a new local variable ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/irq.c