summaryrefslogtreecommitdiffstats
path: root/executer/exmutex.c
diff options
context:
space:
mode:
Diffstat (limited to 'executer/exmutex.c')
-rw-r--r--executer/exmutex.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/executer/exmutex.c b/executer/exmutex.c
index db5ab9e..8b1bebf 100644
--- a/executer/exmutex.c
+++ b/executer/exmutex.c
@@ -490,6 +490,15 @@ AcpiExReleaseMutex (
return_ACPI_STATUS (AE_AML_MUTEX_NOT_ACQUIRED);
}
+ /* Must have a valid thread ID */
+
+ if (!WalkState->Thread)
+ {
+ ACPI_ERROR ((AE_INFO, "Cannot release Mutex [%4.4s], null thread info",
+ AcpiUtGetNodeName (ObjDesc->Mutex.Node)));
+ return_ACPI_STATUS (AE_AML_INTERNAL);
+ }
+
/*
* The Mutex is owned, but this thread must be the owner.
* Special case for Global Lock, any thread can release
@@ -505,15 +514,6 @@ AcpiExReleaseMutex (
return_ACPI_STATUS (AE_AML_NOT_OWNER);
}
- /* Must have a valid thread ID */
-
- if (!WalkState->Thread)
- {
- ACPI_ERROR ((AE_INFO, "Cannot release Mutex [%4.4s], null thread info",
- AcpiUtGetNodeName (ObjDesc->Mutex.Node)));
- return_ACPI_STATUS (AE_AML_INTERNAL);
- }
-
/*
* The sync level of the mutex must be equal to the current sync level. In
* other words, the current level means that at least one mutex at that
OpenPOWER on IntegriCloud