diff options
Diffstat (limited to 'drivers/acpi/executer/exoparg1.c')
-rw-r--r-- | drivers/acpi/executer/exoparg1.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c index dbdf8262ba00..ffc61ddeb659 100644 --- a/drivers/acpi/executer/exoparg1.c +++ b/drivers/acpi/executer/exoparg1.c | |||
@@ -127,15 +127,16 @@ acpi_ex_opcode_0A_0T_1R ( | |||
127 | 127 | ||
128 | cleanup: | 128 | cleanup: |
129 | 129 | ||
130 | if (!walk_state->result_obj) { | ||
131 | walk_state->result_obj = return_desc; | ||
132 | } | ||
133 | |||
134 | /* Delete return object on error */ | 130 | /* Delete return object on error */ |
135 | 131 | ||
136 | if (ACPI_FAILURE (status)) { | 132 | if ((ACPI_FAILURE (status)) || walk_state->result_obj) { |
137 | acpi_ut_remove_reference (return_desc); | 133 | acpi_ut_remove_reference (return_desc); |
138 | } | 134 | } |
135 | else { | ||
136 | /* Save the return value */ | ||
137 | |||
138 | walk_state->result_obj = return_desc; | ||
139 | } | ||
139 | 140 | ||
140 | return_ACPI_STATUS (status); | 141 | return_ACPI_STATUS (status); |
141 | } | 142 | } |