diff --git a/SecurityPkg/Tcg/Tcg2PlatformDxe/Tcg2PlatformDxe.c b/SecurityPkg/Tcg/Tcg2PlatformDxe/Tcg2PlatformDxe.c index b9ed6cf8f9..bb479c1771 100644 --- a/SecurityPkg/Tcg/Tcg2PlatformDxe/Tcg2PlatformDxe.c +++ b/SecurityPkg/Tcg/Tcg2PlatformDxe/Tcg2PlatformDxe.c @@ -43,6 +43,7 @@ SmmReadyToLockEventCallBack ( &Interface ); if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "Failed to locate gEfiDxeSmmReadyToLockProtocolGuid.\n")); return; } @@ -79,7 +80,10 @@ Tcg2PlatformDxeEntryPoint ( &Registration ); - ASSERT (Event != NULL); + if (Event == NULL) { + DEBUG ((DEBUG_ERROR, "Failed to create protocol notify event for SmmReadyToLockProtocol.\n")); + return EFI_DEVICE_ERROR; + } return EFI_SUCCESS; }