diff options
author | Eric Dong <eric.dong@intel.com> | 2014-06-26 03:18:44 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-06-26 03:18:44 +0000 |
commit | d0f65b21c58b958ba370e774c6fe3ddc5ff1f3c7 (patch) | |
tree | 4e9957168a0c8d4fb88819a6efb2412cdf59bc27 | |
parent | 6afd9f45bb4b72ef3952d1b01e9dee909f414b5e (diff) | |
download | edk2-platforms-d0f65b21c58b958ba370e774c6fe3ddc5ff1f3c7.tar.xz |
Refine code to make it more safely.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15597 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | PerformancePkg/Library/TscTimerLib/DxeTscTimerLib.c | 2 |
1 files changed, 2 insertions, 0 deletions
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;
}
|