Skip to content

Commit 4fba15f

Browse files
Aili Yaorafaeljw
authored andcommitted
ACPI, APEI, Fix error return value in apei_map_generic_address()
From commit 6915564 ("ACPI: OSL: Change the type of acpi_os_map_generic_address() return value"), acpi_os_map_generic_address() will return logical address or NULL for error, but for ACPI_ADR_SPACE_SYSTEM_IO case, it should be also return 0 as it's a normal case, but now it will return -ENXIO. So check it out for such case to avoid einj module initialization fail. Fixes: 6915564 ("ACPI: OSL: Change the type of acpi_os_map_generic_address() return value") Cc: <stable@vger.kernel.org> Reviewed-by: James Morse <james.morse@arm.com> Tested-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Aili Yao <yaoaili@kingsoft.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 09162bc commit 4fba15f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/acpi/apei/apei-base.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,10 @@ int apei_map_generic_address(struct acpi_generic_address *reg)
633633
if (rc)
634634
return rc;
635635

636+
/* IO space doesn't need mapping */
637+
if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_IO)
638+
return 0;
639+
636640
if (!acpi_os_map_generic_address(reg))
637641
return -ENXIO;
638642

0 commit comments

Comments
 (0)