From d0f65b21c58b958ba370e774c6fe3ddc5ff1f3c7 Mon Sep 17 00:00:00 2001 From: Eric Dong Date: Thu, 26 Jun 2014 03:18:44 +0000 Subject: Refine code to make it more safely. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong Reviewed-by: Liming Gao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15597 6f19259b-4bc3-4df7-8a09-765794883524 --- PerformancePkg/Library/TscTimerLib/DxeTscTimerLib.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'PerformancePkg/Library') diff --git a/PerformancePkg/Library/TscTimerLib/DxeTscTimerLib.c b/PerformancePkg/Library/TscTimerLib/DxeTscTimerLib.c index c5a789428b..c540d420da 100644 --- a/PerformancePkg/Library/TscTimerLib/DxeTscTimerLib.c +++ b/PerformancePkg/Library/TscTimerLib/DxeTscTimerLib.c @@ -59,11 +59,13 @@ DxeTscTimerLibConstructor ( EFI_STATUS Status; UINT64 *TscFrequency; + TscFrequency = NULL; // // Get TSC frequency from system configuration table with TSC frequency GUID. // Status = EfiGetSystemConfigurationTable (&gEfiTscFrequencyGuid, (VOID **) &TscFrequency); if (Status == EFI_SUCCESS) { + ASSERT (TscFrequency != NULL); mTscFrequency = *TscFrequency; return EFI_SUCCESS; } -- cgit v1.2.3