Re: [edk2] [staging/FmpDevicePkg-master][PATCH] FmpDevicePkg FmpDxe: Check Progress!= NULL before calling Progress(100)

2018-07-27 Thread Kinney, Michael D
Reviewed-by: Michael D Kinney 

Mike

> -Original Message-
> From: Zeng, Star
> Sent: Wednesday, July 25, 2018 3:30 AM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star ; Kinney, Michael D
> 
> Subject: [staging/FmpDevicePkg-master][PATCH]
> FmpDevicePkg FmpDxe: Check Progress!= NULL before
> calling Progress(100)
> 
> Cc: Michael D Kinney 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Star Zeng 
> ---
>  FmpDevicePkg/FmpDxe/FmpDxe.c | 10 ++
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c
> b/FmpDevicePkg/FmpDxe/FmpDxe.c
> index 091f950b95b2..f0e8b0da823a 100644
> --- a/FmpDevicePkg/FmpDxe/FmpDxe.c
> +++ b/FmpDevicePkg/FmpDxe/FmpDxe.c
> @@ -1121,10 +1121,12 @@ cleanup:
>mProgressSupported = FALSE;
>SetLastAttemptStatusInVariable (LastAttemptStatus);
> 
> -  //
> -  // Set progress to 100 after everything is done
> including recording Status.
> -  //
> -  Progress (100);
> +  if (Progress != NULL) {
> +//
> +// Set progress to 100 after everything is done
> including recording Status.
> +//
> +Progress (100);
> +  }
> 
>return Status;
>  }
> --
> 2.7.0.windows.1

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


[edk2] [staging/FmpDevicePkg-master][PATCH] FmpDevicePkg FmpDxe: Check Progress!= NULL before calling Progress(100)

2018-07-25 Thread Star Zeng
Cc: Michael D Kinney 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng 
---
 FmpDevicePkg/FmpDxe/FmpDxe.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c b/FmpDevicePkg/FmpDxe/FmpDxe.c
index 091f950b95b2..f0e8b0da823a 100644
--- a/FmpDevicePkg/FmpDxe/FmpDxe.c
+++ b/FmpDevicePkg/FmpDxe/FmpDxe.c
@@ -1121,10 +1121,12 @@ cleanup:
   mProgressSupported = FALSE;
   SetLastAttemptStatusInVariable (LastAttemptStatus);
 
-  //
-  // Set progress to 100 after everything is done including recording Status.
-  //
-  Progress (100);
+  if (Progress != NULL) {
+//
+// Set progress to 100 after everything is done including recording Status.
+//
+Progress (100);
+  }
 
   return Status;
 }
-- 
2.7.0.windows.1

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