diff options
Diffstat (limited to 'drivers/acpi/executer/exoparg1.c')
-rw-r--r-- | drivers/acpi/executer/exoparg1.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c index 131f49acb1df..c1ba8b48228e 100644 --- a/drivers/acpi/executer/exoparg1.c +++ b/drivers/acpi/executer/exoparg1.c | |||
@@ -904,6 +904,7 @@ acpi_ex_opcode_1A_0T_1R ( | |||
904 | */ | 904 | */ |
905 | return_desc = acpi_ns_get_attached_object ( | 905 | return_desc = acpi_ns_get_attached_object ( |
906 | (struct acpi_namespace_node *) operand[0]); | 906 | (struct acpi_namespace_node *) operand[0]); |
907 | acpi_ut_add_reference (return_desc); | ||
907 | } | 908 | } |
908 | else { | 909 | else { |
909 | /* | 910 | /* |
@@ -953,20 +954,10 @@ acpi_ex_opcode_1A_0T_1R ( | |||
953 | * add another reference to the referenced object, however. | 954 | * add another reference to the referenced object, however. |
954 | */ | 955 | */ |
955 | return_desc = *(operand[0]->reference.where); | 956 | return_desc = *(operand[0]->reference.where); |
956 | if (!return_desc) { | 957 | if (return_desc) { |
957 | /* | 958 | acpi_ut_add_reference (return_desc); |
958 | * We can't return a NULL dereferenced value. This is | ||
959 | * an uninitialized package element and is thus a | ||
960 | * severe error. | ||
961 | */ | ||
962 | ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, | ||
963 | "NULL package element obj %p\n", | ||
964 | operand[0])); | ||
965 | status = AE_AML_UNINITIALIZED_ELEMENT; | ||
966 | goto cleanup; | ||
967 | } | 959 | } |
968 | 960 | ||
969 | acpi_ut_add_reference (return_desc); | ||
970 | break; | 961 | break; |
971 | 962 | ||
972 | 963 | ||