Skip to content

Commit c6cea09

Browse files
arunsbaskaranmergify[bot]
authored andcommitted
SecurityPkg: Trace and return status are handled.
Added debug trace messages on LocateProtocol failure for gEfiDxeSmmReadyToLockProtocolGuid. Returned device error in case of EfiCreateProtocolNotifyEvent failure. Removed ASSERT due to if condition. Signed-off-by: Arun Subramanian Baskaran <[email protected]>
1 parent ff0edea commit c6cea09

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

SecurityPkg/Tcg/Tcg2PlatformDxe/Tcg2PlatformDxe.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ SmmReadyToLockEventCallBack (
4343
&Interface
4444
);
4545
if (EFI_ERROR (Status)) {
46+
DEBUG ((DEBUG_ERROR, "Failed to locate gEfiDxeSmmReadyToLockProtocolGuid.\n"));
4647
return;
4748
}
4849

@@ -79,7 +80,10 @@ Tcg2PlatformDxeEntryPoint (
7980
&Registration
8081
);
8182

82-
ASSERT (Event != NULL);
83+
if (Event == NULL) {
84+
DEBUG ((DEBUG_ERROR, "Failed to create protocol notify event for SmmReadyToLockProtocol.\n"));
85+
return EFI_DEVICE_ERROR;
86+
}
8387

8488
return EFI_SUCCESS;
8589
}

0 commit comments

Comments
 (0)