@@ -780,6 +780,7 @@ int apei_osc_setup(void)
{
static u8 whea_uuid_str[] = "ed855e0c-6c90-47bf-a62a-26de0fc5ad5c";
acpi_handle handle;
+ acpi_status status;
u32 capbuf[3];
struct acpi_osc_context context = {
.uuid_str = whea_uuid_str,
@@ -792,12 +793,12 @@ int apei_osc_setup(void)
capbuf[OSC_SUPPORT_DWORD] = 1;
capbuf[OSC_CONTROL_DWORD] = 0;
- if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle))
- || ACPI_FAILURE(acpi_run_osc(handle, &context)))
+ if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle)))
return -EIO;
- else {
- kfree(context.ret.pointer);
- return 0;
- }
+ status = acpi_run_osc(handle, &context);
+ if (status != AE_SUPPORT && status != AE_OK)
+ return -EIO;
+ kfree(context.ret.pointer);
+ return 0;
}
EXPORT_SYMBOL_GPL(apei_osc_setup);
As this function calls the OSC with the OSC_QUERY_ENABLE set in OSC_QUERY_DWORD, ensure that it continues to operate the same if the function has returned AE_SUPPORT. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> --- drivers/acpi/apei/apei-base.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)