Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117317
b: refs/heads/master
c: c35def2
h: refs/heads/master
i:
  117315: 5e8f218
v: v3
  • Loading branch information
Lin Ming authored and Len Brown committed Oct 23, 2008
1 parent 78e154a commit ec7600f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bbbbeb8e31af97f11b84294b2e7e5607125829d2
refs/heads/master: c35def2118d3d7cceb0f69d6707f613a7473df15
28 changes: 11 additions & 17 deletions trunk/drivers/acpi/parser/psparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ acpi_ps_complete_this_op(struct acpi_walk_state * walk_state,
union acpi_parse_object *next;
const struct acpi_opcode_info *parent_info;
union acpi_parse_object *replacement_op = NULL;
acpi_status status = AE_OK;

ACPI_FUNCTION_TRACE_PTR(ps_complete_this_op, op);

Expand Down Expand Up @@ -186,7 +187,7 @@ acpi_ps_complete_this_op(struct acpi_walk_state * walk_state,
replacement_op =
acpi_ps_alloc_op(AML_INT_RETURN_VALUE_OP);
if (!replacement_op) {
goto allocate_error;
status = AE_NO_MEMORY;
}
break;

Expand All @@ -211,7 +212,7 @@ acpi_ps_complete_this_op(struct acpi_walk_state * walk_state,
replacement_op =
acpi_ps_alloc_op(AML_INT_RETURN_VALUE_OP);
if (!replacement_op) {
goto allocate_error;
status = AE_NO_MEMORY;
}
} else
if ((op->common.parent->common.aml_opcode ==
Expand All @@ -226,13 +227,13 @@ acpi_ps_complete_this_op(struct acpi_walk_state * walk_state,
acpi_ps_alloc_op(op->common.
aml_opcode);
if (!replacement_op) {
goto allocate_error;
status = AE_NO_MEMORY;
} else {
replacement_op->named.data =
op->named.data;
replacement_op->named.length =
op->named.length;
}

replacement_op->named.data =
op->named.data;
replacement_op->named.length =
op->named.length;
}
}
break;
Expand All @@ -242,7 +243,7 @@ acpi_ps_complete_this_op(struct acpi_walk_state * walk_state,
replacement_op =
acpi_ps_alloc_op(AML_INT_RETURN_VALUE_OP);
if (!replacement_op) {
goto allocate_error;
status = AE_NO_MEMORY;
}
}

Expand Down Expand Up @@ -302,14 +303,7 @@ acpi_ps_complete_this_op(struct acpi_walk_state * walk_state,
/* Now we can actually delete the subtree rooted at Op */

acpi_ps_delete_parse_tree(op);
return_ACPI_STATUS(AE_OK);

allocate_error:

/* Always delete the subtree, even on error */

acpi_ps_delete_parse_tree(op);
return_ACPI_STATUS(AE_NO_MEMORY);
return_ACPI_STATUS(status);
}

/*******************************************************************************
Expand Down

0 comments on commit ec7600f

Please sign in to comment.