diff options
-rw-r--r-- | drivers/acpi/parser/psparse.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c index 68e932f215ea..dfd3d9028018 100644 --- a/drivers/acpi/parser/psparse.c +++ b/drivers/acpi/parser/psparse.c | |||
@@ -451,6 +451,14 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) | |||
451 | 451 | ||
452 | thread = acpi_ut_create_thread_state(); | 452 | thread = acpi_ut_create_thread_state(); |
453 | if (!thread) { | 453 | if (!thread) { |
454 | if (walk_state->method_desc) { | ||
455 | |||
456 | /* Executing a control method - additional cleanup */ | ||
457 | |||
458 | acpi_ds_terminate_control_method( | ||
459 | walk_state->method_desc, walk_state); | ||
460 | } | ||
461 | |||
454 | acpi_ds_delete_walk_state(walk_state); | 462 | acpi_ds_delete_walk_state(walk_state); |
455 | return_ACPI_STATUS(AE_NO_MEMORY); | 463 | return_ACPI_STATUS(AE_NO_MEMORY); |
456 | } | 464 | } |