aboutsummaryrefslogtreecommitdiff
path: root/src/vendorcode/amd/agesa/f10/Proc/CPU/cpuEventLog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vendorcode/amd/agesa/f10/Proc/CPU/cpuEventLog.c')
-rw-r--r--src/vendorcode/amd/agesa/f10/Proc/CPU/cpuEventLog.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vendorcode/amd/agesa/f10/Proc/CPU/cpuEventLog.c b/src/vendorcode/amd/agesa/f10/Proc/CPU/cpuEventLog.c
index 4c70418eb6..efb3f93519 100644
--- a/src/vendorcode/amd/agesa/f10/Proc/CPU/cpuEventLog.c
+++ b/src/vendorcode/amd/agesa/f10/Proc/CPU/cpuEventLog.c
@@ -117,6 +117,8 @@ AmdReadEventLog (
ASSERT (Event != NULL);
Status = GetEventLog (&LogEvent, &Event->StdHeader);
+ if (Status != AGESA_SUCCESS)
+ return Status;
Event->EventClass = LogEvent.EventClass;
Event->EventInfo = LogEvent.EventInfo;
@@ -205,6 +207,9 @@ PutEventLog (
AgesaEventAlloc = NULL;
GetEventLogHeapPointer (&AgesaEventAlloc, StdHeader);
ASSERT (AgesaEventAlloc != NULL);
+ if (AgesaEventAlloc == NULL)
+ return;
+
Index = AgesaEventAlloc->WriteRecordPtr;
// Add the new event log data into a circular buffer
@@ -267,6 +272,8 @@ GetEventLog (
GetEventLogHeapPointer (&AgesaEventAlloc, StdHeader);
ASSERT (AgesaEventAlloc != NULL);
+ if (AgesaEventAlloc == NULL)
+ return AGESA_BOUNDS_CHK;
if ((AgesaEventAlloc->ReadRecordPtr == AgesaEventAlloc->WriteRecordPtr) &&
(AgesaEventAlloc->ReadWriteFlag == 1)) {
@@ -324,6 +331,8 @@ PeekEventLog (
GetEventLogHeapPointer (&AgesaEventAlloc, StdHeader);
ASSERT (AgesaEventAlloc != NULL);
+ if (AgesaEventAlloc == NULL)
+ return FALSE;
if ((AgesaEventAlloc->ReadRecordPtr == AgesaEventAlloc->WriteRecordPtr) &&
(AgesaEventAlloc->ReadWriteFlag == 1)) {