aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/executer/exstore.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/executer/exstore.c')
-rw-r--r--drivers/acpi/executer/exstore.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/drivers/acpi/executer/exstore.c b/drivers/acpi/executer/exstore.c
index 2408122cb3b2..725614e277f8 100644
--- a/drivers/acpi/executer/exstore.c
+++ b/drivers/acpi/executer/exstore.c
@@ -434,11 +434,24 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc,
434 */ 434 */
435 obj_desc = *(index_desc->reference.where); 435 obj_desc = *(index_desc->reference.where);
436 436
437 status = 437 if (ACPI_GET_OBJECT_TYPE(source_desc) ==
438 acpi_ut_copy_iobject_to_iobject(source_desc, &new_desc, 438 ACPI_TYPE_LOCAL_REFERENCE
439 walk_state); 439 && source_desc->reference.opcode == AML_LOAD_OP) {
440 if (ACPI_FAILURE(status)) { 440
441 return_ACPI_STATUS(status); 441 /* This is a DDBHandle, just add a reference to it */
442
443 acpi_ut_add_reference(source_desc);
444 new_desc = source_desc;
445 } else {
446 /* Normal object, copy it */
447
448 status =
449 acpi_ut_copy_iobject_to_iobject(source_desc,
450 &new_desc,
451 walk_state);
452 if (ACPI_FAILURE(status)) {
453 return_ACPI_STATUS(status);
454 }
442 } 455 }
443 456
444 if (obj_desc) { 457 if (obj_desc) {