]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg OpalPasswordDxe: Return directly if no any device
authorStar Zeng <star.zeng@intel.com>
Tue, 13 Mar 2018 01:18:03 +0000 (09:18 +0800)
committerStar Zeng <star.zeng@intel.com>
Sat, 17 Mar 2018 07:41:03 +0000 (15:41 +0800)
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>
SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c

index d2597ce33ec12ffb5a1dff75b4b7d0c1046fcdf5..1b55bbe4ecb840f12c32cd2002cfe42b753e087b 100644 (file)
@@ -610,6 +610,14 @@ OpalEndOfDxeEventNotify (
     mOpalRequestVariableSize = 0;\r
   }\r
 \r
     mOpalRequestVariableSize = 0;\r
   }\r
 \r
+  //\r
+  // If no any device, return directly.\r
+  //\r
+  if (mOpalDriver.DeviceList == NULL) {\r
+    gBS->CloseEvent (Event);\r
+    return;\r
+  }\r
+\r
   //\r
   // Assume 64K size and alignment are enough.\r
   //\r
   //\r
   // Assume 64K size and alignment are enough.\r
   //\r