summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/exoparg1.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/exoparg1.c')
-rw-r--r--sys/contrib/dev/acpica/exoparg1.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/sys/contrib/dev/acpica/exoparg1.c b/sys/contrib/dev/acpica/exoparg1.c
index 60d65b7..1600e62 100644
--- a/sys/contrib/dev/acpica/exoparg1.c
+++ b/sys/contrib/dev/acpica/exoparg1.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exoparg1 - AML execution - opcodes with 1 argument
- * $Revision: 143 $
+ * $Revision: 146 $
*
*****************************************************************************/
@@ -453,12 +453,6 @@ AcpiExOpcode_1A_1T_1R (
* return FALSE
*/
ReturnDesc->Integer.Value = 0;
-
- /*
- * Must delete the result descriptor since there is no reference
- * being returned
- */
- AcpiUtRemoveReference (Operand[1]);
goto Cleanup;
}
@@ -499,14 +493,19 @@ AcpiExOpcode_1A_1T_1R (
return_ACPI_STATUS (Status);
}
- /*
- * Normally, we would remove a reference on the Operand[0] parameter;
- * But since it is being used as the internal return object
- * (meaning we would normally increment it), the two cancel out,
- * and we simply don't do anything.
- */
- WalkState->ResultObj = Operand[0];
- WalkState->Operands[0] = NULL; /* Prevent deletion */
+ /* It is possible that the Store already produced a return object */
+
+ if (!WalkState->ResultObj)
+ {
+ /*
+ * Normally, we would remove a reference on the Operand[0] parameter;
+ * But since it is being used as the internal return object
+ * (meaning we would normally increment it), the two cancel out,
+ * and we simply don't do anything.
+ */
+ WalkState->ResultObj = Operand[0];
+ WalkState->Operands[0] = NULL; /* Prevent deletion */
+ }
return_ACPI_STATUS (Status);
@@ -571,7 +570,10 @@ AcpiExOpcode_1A_1T_1R (
Cleanup:
- WalkState->ResultObj = ReturnDesc;
+ if (!WalkState->ResultObj)
+ {
+ WalkState->ResultObj = ReturnDesc;
+ }
/* Delete return object on error */
@@ -767,7 +769,7 @@ AcpiExOpcode_1A_0T_1R (
{
switch (ACPI_GET_OBJECT_TYPE (Operand[0]))
{
- case INTERNAL_TYPE_REFERENCE:
+ case ACPI_TYPE_LOCAL_REFERENCE:
/*
* This is a DerefOf (LocalX | ArgX)
*
OpenPOWER on IntegriCloud