summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Kaneda <erik.kaneda@intel.com>2020-05-05 02:46:51 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-05-09 10:55:54 +0200
commit034fdaa508038507d5a1781490bda61914861cb0 (patch)
tree9a1decadac0337d486a2f11be3b9c03cafef3478
parentACPICA: Move acpi_gbl_next_cmd_num definition to acglobal.h (diff)
downloadlinux-034fdaa508038507d5a1781490bda61914861cb0.tar.xz
linux-034fdaa508038507d5a1781490bda61914861cb0.zip
ACPICA: Disassembler: ignore AE_ALREADY_EXISTS status when parsing create operators
ACPICA commit cd66d0a50fdc9cc4dcd998e08e7aa3c4154bea2d Disassembler is intended to emit existing ASL code as-is. Therefore, error messages emitted during disassembly should be ignored or handled in a way such that the disassembler can continue to parse the AML. This change ignores AE_ALREADY_EXISTS errors during the deferred Op parsing for create operators in order to complete parsing ASL termlists. Link: https://github.com/acpica/acpica/commit/cd66d0a5 Signed-off-by: Erik Kaneda <erik.kaneda@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/acpica/dsfield.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/acpi/acpica/dsfield.c b/drivers/acpi/acpica/dsfield.c
index c901f5aec739..0189b5d4e3a3 100644
--- a/drivers/acpi/acpica/dsfield.c
+++ b/drivers/acpi/acpica/dsfield.c
@@ -177,7 +177,10 @@ acpi_ds_create_buffer_field(union acpi_parse_object *op,
arg->common.value.string, ACPI_TYPE_ANY,
ACPI_IMODE_LOAD_PASS1, flags,
walk_state, &node);
- if (ACPI_FAILURE(status)) {
+ if ((walk_state->parse_flags & ACPI_PARSE_DISASSEMBLE)
+ && status == AE_ALREADY_EXISTS) {
+ status = AE_OK;
+ } else if (ACPI_FAILURE(status)) {
ACPI_ERROR_NAMESPACE(walk_state->scope_info,
arg->common.value.string, status);
return_ACPI_STATUS(status);