提交 4fba15fb 编写于 作者: A Aili Yao 提交者: Rafael J. Wysocki

ACPI, APEI, Fix error return value in apei_map_generic_address()

From commit 6915564d ("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: 6915564d ("ACPI: OSL: Change the type of acpi_os_map_generic_address() return value")
Cc: <stable@vger.kernel.org>
Reviewed-by: NJames Morse <james.morse@arm.com>
Tested-by: NTony Luck <tony.luck@intel.com>
Signed-off-by: NAili Yao <yaoaili@kingsoft.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 09162bc3
......@@ -633,6 +633,10 @@ int apei_map_generic_address(struct acpi_generic_address *reg)
if (rc)
return rc;
/* IO space doesn't need mapping */
if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_IO)
return 0;
if (!acpi_os_map_generic_address(reg))
return -ENXIO;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册