Reviewed-by: jiewen....@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.z...@intel.com>; Yao, Jiewen <jiewen....@intel.com>;
> Dong, Eric <eric.d...@intel.com>; Zhang, Chao B <chao.b.zh...@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....@intel.com>
> Cc: Eric Dong <eric.d...@intel.com>
> Cc: Chao Zhang <chao.b.zh...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Star Zeng <star.z...@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

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to