aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/dispatcher/dsobject.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/acpi/dispatcher/dsobject.c b/drivers/acpi/dispatcher/dsobject.c
index 954ac8ce958a..fe28b9aeb65c 100644
--- a/drivers/acpi/dispatcher/dsobject.c
+++ b/drivers/acpi/dispatcher/dsobject.c
@@ -370,6 +370,8 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
370 union acpi_operand_object *obj_desc = NULL; 370 union acpi_operand_object *obj_desc = NULL;
371 acpi_status status = AE_OK; 371 acpi_status status = AE_OK;
372 acpi_native_uint i; 372 acpi_native_uint i;
373 u16 index;
374 u16 reference_count;
373 375
374 ACPI_FUNCTION_TRACE(ds_build_internal_package_obj); 376 ACPI_FUNCTION_TRACE(ds_build_internal_package_obj);
375 377
@@ -447,6 +449,26 @@ acpi_ds_build_internal_package_obj(struct acpi_walk_state *walk_state,
447 package. 449 package.
448 elements[i]); 450 elements[i]);
449 } 451 }
452
453 if (*obj_desc_ptr) {
454
455 /* Existing package, get existing reference count */
456
457 reference_count =
458 (*obj_desc_ptr)->common.reference_count;
459 if (reference_count > 1) {
460
461 /* Make new element ref count match original ref count */
462
463 for (index = 0; index < (reference_count - 1);
464 index++) {
465 acpi_ut_add_reference((obj_desc->
466 package.
467 elements[i]));
468 }
469 }
470 }
471
450 arg = arg->common.next; 472 arg = arg->common.next;
451 } 473 }
452 474