diff options
-rw-r--r-- | SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c index d2597ce..1b55bbe 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c @@ -611,6 +611,14 @@ OpalEndOfDxeEventNotify ( }
//
+ // If no any device, return directly.
+ //
+ if (mOpalDriver.DeviceList == NULL) {
+ gBS->CloseEvent (Event);
+ return;
+ }
+
+ //
// Assume 64K size and alignment are enough.
//
Length = 0x10000;
|