mirror of
https://github.com/acpica/acpica/
synced 2025-02-25 09:54:42 +03:00
Events: add a return on failure from AcpiHwRegisterRead
This ensures that AcpiEvFixedEventDetect does not use FixedStatus and and FixedEnable as uninitialized variables. Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
This commit is contained in:
parent
f25165d2f5
commit
02e4379622
@ -344,6 +344,7 @@ AcpiEvFixedEventDetect (
|
||||
UINT32 FixedStatus;
|
||||
UINT32 FixedEnable;
|
||||
UINT32 i;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_NAME (EvFixedEventDetect);
|
||||
@ -353,8 +354,12 @@ AcpiEvFixedEventDetect (
|
||||
* Read the fixed feature status and enable registers, as all the cases
|
||||
* depend on their values. Ignore errors here.
|
||||
*/
|
||||
(void) AcpiHwRegisterRead (ACPI_REGISTER_PM1_STATUS, &FixedStatus);
|
||||
(void) AcpiHwRegisterRead (ACPI_REGISTER_PM1_ENABLE, &FixedEnable);
|
||||
Status = AcpiHwRegisterRead (ACPI_REGISTER_PM1_STATUS, &FixedStatus);
|
||||
Status |= AcpiHwRegisterRead (ACPI_REGISTER_PM1_ENABLE, &FixedEnable);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (IntStatus);
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS,
|
||||
"Fixed Event Block: Enable %08X Status %08X\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user