File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -668,6 +668,8 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
668
668
union acpi_parse_object * arguments [ACPI_OBJ_NUM_OPERANDS ];
669
669
u32 arg_count = 0 ;
670
670
u32 index = walk_state -> num_operands ;
671
+ u32 prev_num_operands = walk_state -> num_operands ;
672
+ u32 new_num_operands ;
671
673
u32 i ;
672
674
673
675
ACPI_FUNCTION_TRACE_PTR (ds_create_operands , first_arg );
@@ -696,6 +698,7 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
696
698
697
699
/* Create the interpreter arguments, in reverse order */
698
700
701
+ new_num_operands = index ;
699
702
index -- ;
700
703
for (i = 0 ; i < arg_count ; i ++ ) {
701
704
arg = arguments [index ];
@@ -720,7 +723,11 @@ acpi_ds_create_operands(struct acpi_walk_state *walk_state,
720
723
* pop everything off of the operand stack and delete those
721
724
* objects
722
725
*/
723
- acpi_ds_obj_stack_pop_and_delete (arg_count , walk_state );
726
+ walk_state -> num_operands = i ;
727
+ acpi_ds_obj_stack_pop_and_delete (new_num_operands , walk_state );
728
+
729
+ /* Restore operand count */
730
+ walk_state -> num_operands = prev_num_operands ;
724
731
725
732
ACPI_EXCEPTION ((AE_INFO , status , "While creating Arg %u" , index ));
726
733
return_ACPI_STATUS (status );
You can’t perform that action at this time.
0 commit comments