From: Olivier Martin <olivier.mar...@arm.com>

... as explicitly said by the comment.

Signed-off-by: Olivier Martin <olivier.mar...@arm.com>

Change-Id: Id9fd51dd5510d6acd04fe2c323a901248c4b85c3
---
 MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c 
b/MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c
index 4c0f3dd..9cdbb43 100644
--- a/MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c
+++ b/MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c
@@ -79,8 +79,10 @@ MnpGetModeData (
     // Upon successful return of GetStatus(), the Snp->Mode->MediaPresent
     // will be updated to reflect any change of media status
     //
-    Snp->GetStatus (Snp, &InterruptStatus, NULL);
-    CopyMem (SnpModeData, Snp->Mode, sizeof (*SnpModeData));
+    Status = Snp->GetStatus (Snp, &InterruptStatus, NULL);
+    if (!EFI_ERROR (Status)) {
+      CopyMem (SnpModeData, Snp->Mode, sizeof (*SnpModeData));
+    }
   }
 
   if (!Instance->Configured) {
-- 
1.7.10.4


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to