summaryrefslogtreecommitdiff
path: root/source/components/events
diff options
context:
space:
mode:
authorErik Schmauss <erik.schmauss@intel.com>2018-03-09 10:21:29 -0800
committerErik Schmauss <erik.schmauss@intel.com>2018-03-09 10:21:29 -0800
commit02e437962289b4b938d1059c00e6d50a6e1a11c3 (patch)
tree4921faae584772103a89a19e341385869fa89411 /source/components/events
parentf25165d2f559c5cb223c83be80674e8a0891c219 (diff)
downloadacpica-02e437962289b4b938d1059c00e6d50a6e1a11c3.tar.gz
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>
Diffstat (limited to 'source/components/events')
-rw-r--r--source/components/events/evevent.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/components/events/evevent.c b/source/components/events/evevent.c
index 755ab9935..791ee57eb 100644
--- a/source/components/events/evevent.c
+++ b/source/components/events/evevent.c
@@ -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",