diff options
author | Star Zeng <star.zeng@intel.com> | 2018-03-13 09:18:03 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2018-03-17 15:51:19 +0800 |
commit | 8f75e458a09ddcfef47079ffaf72876944cd512b (patch) | |
tree | a270d8ada0adc592ce01ded8e2159bb7d3cadbba | |
parent | 61384921e01a16dc33efec3f25f32d08a78cd30b (diff) | |
download | edk2-8f75e458a09ddcfef47079ffaf72876944cd512b.tar.gz |
SecurityPkg OpalPasswordDxe: Return directly if no any device
Return directly if no any device in EndOfDxe notification.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
(cherry picked from commit fbe1328a51136538ec985ce7b9ef7cf97ba999e9)
-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 d2597ce33e..1b55bbe4ec 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;
|