diff --git a/EdkModulePkg/Library/EdkUefiRuntimeLib/Common/RuntimeLib.c b/EdkModulePkg/Library/EdkUefiRuntimeLib/Common/RuntimeLib.c index 335a9b9bc7..32eaed74a2 100644 --- a/EdkModulePkg/Library/EdkUefiRuntimeLib/Common/RuntimeLib.c +++ b/EdkModulePkg/Library/EdkUefiRuntimeLib/Common/RuntimeLib.c @@ -102,18 +102,16 @@ RuntimeDriverLibConstruct ( // // Register SetVirtualAddressMap () notify function // - if (_gDriverSetVirtualAddressMapEvent[0] != NULL) { - ASSERT (gBS != NULL); - Status = gBS->CreateEvent ( - EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE, - EFI_TPL_NOTIFY, - RuntimeLibVirtualNotifyEvent, - NULL, - &mEfiVirtualNotifyEvent - ); + ASSERT (gBS != NULL); + Status = gBS->CreateEvent ( + EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE, + EFI_TPL_NOTIFY, + RuntimeLibVirtualNotifyEvent, + NULL, + &mEfiVirtualNotifyEvent + ); - ASSERT_EFI_ERROR (Status); - } + ASSERT_EFI_ERROR (Status); return EFI_SUCCESS; }