public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] SecurityPkg OpalPasswordDxe: Return directly if no any device
@ 2018-03-13  1:28 Star Zeng
  2018-03-13  7:31 ` Yao, Jiewen
  0 siblings, 1 reply; 2+ messages in thread
From: Star Zeng @ 2018-03-13  1:28 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Jiewen Yao, Eric Dong, Chao Zhang

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>
---
 SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
index d2597ce33ec1..1b55bbe4ecb8 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;
-- 
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] SecurityPkg OpalPasswordDxe: Return directly if no any device
  2018-03-13  1:28 [PATCH] SecurityPkg OpalPasswordDxe: Return directly if no any device Star Zeng
@ 2018-03-13  7:31 ` Yao, Jiewen
  0 siblings, 0 replies; 2+ messages in thread
From: Yao, Jiewen @ 2018-03-13  7:31 UTC (permalink / raw)
  To: Zeng, Star, edk2-devel@lists.01.org; +Cc: Dong, Eric, Zhang, Chao B

Reviewed-by: Jiewen.yao@intel.com

> -----Original Message-----
> From: Zeng, Star
> Sent: Tuesday, March 13, 2018 9:29 AM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>;
> Dong, Eric <eric.dong@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>
> Subject: [PATCH] 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>
> ---
>  SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
> b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
> index d2597ce33ec1..1b55bbe4ecb8 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;
> --
> 2.7.0.windows.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-13  7:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-13  1:28 [PATCH] SecurityPkg OpalPasswordDxe: Return directly if no any device Star Zeng
2018-03-13  7:31 ` Yao, Jiewen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox