ACPICA: Enhance implicit return mechanism
[deliverable/linux.git] / drivers / acpi / parser / psxface.c
index 4985ce58c02432ff30169dd56dde35d478ada180..41b0c8c052a8f8235e3c0eff38f9a048245cc70e 100644 (file)
@@ -295,6 +295,22 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info)
                goto cleanup;
        }
 
+       /*
+        * Start method evaluation with an implicit return of zero.
+        * This is done for Windows compatibility.
+        */
+       if (acpi_gbl_enable_interpreter_slack) {
+               walk_state->implicit_return_obj =
+                   acpi_ut_create_internal_object(ACPI_TYPE_INTEGER);
+               if (!walk_state->implicit_return_obj) {
+                       status = AE_NO_MEMORY;
+                       acpi_ds_delete_walk_state(walk_state);
+                       goto cleanup;
+               }
+
+               walk_state->implicit_return_obj->integer.value = 0;
+       }
+
        /* Parse the AML */
 
        status = acpi_ps_parse_aml(walk_state);
This page took 0.024515 seconds and 5 git commands to generate.