diff options
Diffstat (limited to 'drivers/acpi/acpica/exoparg1.c')
-rw-r--r-- | drivers/acpi/acpica/exoparg1.c | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/drivers/acpi/acpica/exoparg1.c b/drivers/acpi/acpica/exoparg1.c index 77930683a..4e17506a7 100644 --- a/drivers/acpi/acpica/exoparg1.c +++ b/drivers/acpi/acpica/exoparg1.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2015, Intel Corp. + * Copyright (C) 2000 - 2016, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -484,22 +484,26 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) case AML_TO_DECSTRING_OP: /* to_decimal_string (Data, Result) */ - status = acpi_ex_convert_to_string(operand[0], &return_desc, - ACPI_EXPLICIT_CONVERT_DECIMAL); + status = + acpi_ex_convert_to_string(operand[0], &return_desc, + ACPI_EXPLICIT_CONVERT_DECIMAL); if (return_desc == operand[0]) { /* No conversion performed, add ref to handle return value */ + acpi_ut_add_reference(return_desc); } break; case AML_TO_HEXSTRING_OP: /* to_hex_string (Data, Result) */ - status = acpi_ex_convert_to_string(operand[0], &return_desc, - ACPI_EXPLICIT_CONVERT_HEX); + status = + acpi_ex_convert_to_string(operand[0], &return_desc, + ACPI_EXPLICIT_CONVERT_HEX); if (return_desc == operand[0]) { /* No conversion performed, add ref to handle return value */ + acpi_ut_add_reference(return_desc); } break; @@ -510,17 +514,20 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) if (return_desc == operand[0]) { /* No conversion performed, add ref to handle return value */ + acpi_ut_add_reference(return_desc); } break; case AML_TO_INTEGER_OP: /* to_integer (Data, Result) */ - status = acpi_ex_convert_to_integer(operand[0], &return_desc, - ACPI_ANY_BASE); + status = + acpi_ex_convert_to_integer(operand[0], &return_desc, + ACPI_ANY_BASE); if (return_desc == operand[0]) { /* No conversion performed, add ref to handle return value */ + acpi_ut_add_reference(return_desc); } break; @@ -679,7 +686,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) status = acpi_ex_store(return_desc, operand[0], walk_state); break; - case AML_TYPE_OP: /* object_type (source_object) */ + case AML_OBJECT_TYPE_OP: /* object_type (source_object) */ /* * Note: The operand is not resolved at this point because we want to * get the associated object, not its value. For example, we don't @@ -713,9 +720,9 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) /* Get the base object */ - status = acpi_ex_resolve_multiple(walk_state, - operand[0], &type, - &temp_desc); + status = + acpi_ex_resolve_multiple(walk_state, operand[0], &type, + &temp_desc); if (ACPI_FAILURE(status)) { goto cleanup; } @@ -759,8 +766,10 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) default: ACPI_ERROR((AE_INFO, - "Operand must be Buffer/Integer/String/Package - found type %s", + "Operand must be Buffer/Integer/String/Package" + " - found type %s", acpi_ut_get_type_name(type))); + status = AE_AML_OPERAND_TYPE; goto cleanup; } @@ -981,6 +990,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) "Unknown Index TargetType 0x%X in reference object %p", operand[0]->reference. target_type, operand[0])); + status = AE_AML_OPERAND_TYPE; goto cleanup; } @@ -1050,6 +1060,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) ACPI_ERROR((AE_INFO, "Unknown AML opcode 0x%X", walk_state->opcode)); + status = AE_AML_BAD_OPCODE; goto cleanup; } |