diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c index ef72b9b45d..94e5ab2c0e 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c @@ -226,12 +226,14 @@ SetProcessorRegister ( CPU_REGISTER_TABLE *RegisterTable; InitApicId = GetInitialApicId (); + RegisterTable = NULL; for (Index = 0; Index < RegisterTableCount; Index++) { if (RegisterTables[Index].InitialApicId == InitApicId) { RegisterTable = &RegisterTables[Index]; break; } } + ASSERT (RegisterTable != NULL); // // Traverse Register Table of this logical processor