aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi/executer/exoparg1.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/executer/exoparg1.c')
-rw-r--r--drivers/acpi/executer/exoparg1.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c
index 4f3627ee2b2..d00f766246f 100644
--- a/drivers/acpi/executer/exoparg1.c
+++ b/drivers/acpi/executer/exoparg1.c
@@ -554,16 +554,18 @@ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state)
cleanup:
- if (!walk_state->result_obj) {
- walk_state->result_obj = return_desc;
- }
-
/* Delete return object on error */
if (ACPI_FAILURE(status)) {
acpi_ut_remove_reference(return_desc);
}
+ /* Save return object on success */
+
+ else if (!walk_state->result_obj) {
+ walk_state->result_obj = return_desc;
+ }
+
return_ACPI_STATUS(status);
}
@@ -1028,6 +1030,11 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state)
acpi_ut_remove_reference(return_desc);
}
- walk_state->result_obj = return_desc;
+ /* Save return object on success */
+
+ else {
+ walk_state->result_obj = return_desc;
+ }
+
return_ACPI_STATUS(status);
}