goto end; 
acpi_ds_call_control_method(struct acpi_thread_state *thread,			    struct acpi_walk_state *this_walk_state,			    union acpi_parse_object *op){	acpi_status status;	struct acpi_namespace_node *method_node;	struct acpi_walk_state *next_walk_state = NULL;	union acpi_operand_object *obj_desc;	struct acpi_parameter_info info;	u32 i;	ACPI_FUNCTION_TRACE_PTR("ds_call_control_method", this_walk_state);	ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,			  "Execute method %p, currentstate=%p\n",			  this_walk_state->prev_op, this_walk_state));	/*	 * Get the namespace entry for the control method we are about to call	 */	method_node = this_walk_state->method_call_node;	if (!method_node) {		return_ACPI_STATUS(AE_NULL_ENTRY);	}	obj_desc = acpi_ns_get_attached_object(method_node);	if (!obj_desc) {		return_ACPI_STATUS(AE_NULL_OBJECT);	}	/* Init for new method, wait on concurrency semaphore */	status = acpi_ds_begin_method_execution(method_node, obj_desc,						this_walk_state->method_node);	if (ACPI_FAILURE(status)) {		goto cleanup;	}	if (!(obj_desc->method.method_flags & AML_METHOD_INTERNAL_ONLY)) {		/* 1) Parse: Create a new walk state for the preempting walk */		next_walk_state =		    acpi_ds_create_walk_state(obj_desc->method.owner_id, op,					      obj_desc, NULL);		if (!next_walk_state) {			return_ACPI_STATUS(AE_NO_MEMORY);		}		/* Create and init a Root Node */		op = acpi_ps_create_scope_op();		if (!op) {			status = AE_NO_MEMORY;			goto cleanup;		}		status = acpi_ds_init_aml_walk(next_walk_state, op, method_node,					       obj_desc->method.aml_start,					       obj_desc->method.aml_length,					       NULL, 1);		if (ACPI_FAILURE(status)) {			acpi_ds_delete_walk_state(next_walk_state);			goto cleanup;		}		/* Begin AML parse */		status = acpi_ps_parse_aml(next_walk_state);		acpi_ps_delete_parse_tree(op);	}	/* 2) Execute: Create a new state for the preempting walk */	next_walk_state = acpi_ds_create_walk_state(obj_desc->method.owner_id,						    NULL, obj_desc, thread);	if (!next_walk_state) {		status = AE_NO_MEMORY;		goto cleanup;	}	/*	 * The resolved arguments were put on the previous walk state's operand	 * stack.  Operands on the previous walk state stack always	 * start at index 0.	 * Null terminate the list of arguments	 */	this_walk_state->operands[this_walk_state->num_operands] = NULL;	info.parameters = &this_walk_state->operands[0];	info.parameter_type = ACPI_PARAM_ARGS;	status = acpi_ds_init_aml_walk(next_walk_state, NULL, method_node,				       obj_desc->method.aml_start,				       obj_desc->method.aml_length, &info, 3);	if (ACPI_FAILURE(status)) {		goto cleanup;	}	/*	 * Delete the operands on the previous walkstate operand stack	 * (they were copied to new objects)	 */	for (i = 0; i < obj_desc->method.param_count; i++) {		acpi_ut_remove_reference(this_walk_state->operands[i]);		this_walk_state->operands[i] = NULL;	}	/* Clear the operand stack */	this_walk_state->num_operands = 0;	ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,			  "Starting nested execution, newstate=%p\n",			  next_walk_state));	if (obj_desc->method.method_flags & AML_METHOD_INTERNAL_ONLY) {		status = obj_desc->method.implementation(next_walk_state);	}	goto end;cleanup:	/* Decrement the thread count on the method parse tree */	if (next_walk_state && (next_walk_state->method_desc)) {		next_walk_state->method_desc->method.thread_count--;	}	/* On error, we must delete the new walk state */	acpi_ds_terminate_control_method (next_walk_state);	acpi_ds_delete_walk_state (next_walk_state);end:	return_ACPI_STATUS(status);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/a94f18810f52d3a6de0a09bee0c7258b62eca262/dsmethod.c/buggy/drivers/acpi/dispatcher/dsmethod.c