mirror of
https://github.com/acpica/acpica/
synced 2025-02-07 17:14:13 +03:00
Move check for valid Thread ID structure.
This change moves the check for a valid Thread ID structure up a few lines to insure that the check is made before the structure is actually used. Dan Carpenter.
This commit is contained in:
parent
cf2bc7db05
commit
93324dd734
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user