diff options
Diffstat (limited to 'drivers/acpi/executer')
-rw-r--r-- | drivers/acpi/executer/exoparg1.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c index ab5c03724527..313803b53125 100644 --- a/drivers/acpi/executer/exoparg1.c +++ b/drivers/acpi/executer/exoparg1.c | |||
@@ -740,26 +740,38 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) | |||
740 | value = acpi_gbl_integer_byte_width; | 740 | value = acpi_gbl_integer_byte_width; |
741 | break; | 741 | break; |
742 | 742 | ||
743 | case ACPI_TYPE_BUFFER: | ||
744 | value = temp_desc->buffer.length; | ||
745 | break; | ||
746 | |||
747 | case ACPI_TYPE_STRING: | 743 | case ACPI_TYPE_STRING: |
748 | value = temp_desc->string.length; | 744 | value = temp_desc->string.length; |
749 | break; | 745 | break; |
750 | 746 | ||
747 | case ACPI_TYPE_BUFFER: | ||
748 | |||
749 | /* Buffer arguments may not be evaluated at this point */ | ||
750 | |||
751 | status = acpi_ds_get_buffer_arguments(temp_desc); | ||
752 | value = temp_desc->buffer.length; | ||
753 | break; | ||
754 | |||
751 | case ACPI_TYPE_PACKAGE: | 755 | case ACPI_TYPE_PACKAGE: |
756 | |||
757 | /* Package arguments may not be evaluated at this point */ | ||
758 | |||
759 | status = acpi_ds_get_package_arguments(temp_desc); | ||
752 | value = temp_desc->package.count; | 760 | value = temp_desc->package.count; |
753 | break; | 761 | break; |
754 | 762 | ||
755 | default: | 763 | default: |
756 | ACPI_ERROR((AE_INFO, | 764 | ACPI_ERROR((AE_INFO, |
757 | "Operand is not Buf/Int/Str/Pkg - found type %s", | 765 | "Operand must be Buffer/Integer/String/Package - found type %s", |
758 | acpi_ut_get_type_name(type))); | 766 | acpi_ut_get_type_name(type))); |
759 | status = AE_AML_OPERAND_TYPE; | 767 | status = AE_AML_OPERAND_TYPE; |
760 | goto cleanup; | 768 | goto cleanup; |
761 | } | 769 | } |
762 | 770 | ||
771 | if (ACPI_FAILURE(status)) { | ||
772 | goto cleanup; | ||
773 | } | ||
774 | |||
763 | /* | 775 | /* |
764 | * Now that we have the size of the object, create a result | 776 | * Now that we have the size of the object, create a result |
765 | * object to hold the value | 777 | * object to hold the value |