]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
Fix bug for UefiPxeBcDxe driver to catch the return status.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / UefiPxeBcDxe / PxeBcImpl.c
index 4ea15a6314f508222b6b33a0ef18e14af78e3c41..dfdfd35cb76387fe751845478405875f2cc85a68 100644 (file)
@@ -1024,6 +1024,7 @@ EfiPxeBcDiscover (
     } else {\r
       Status = EFI_DEVICE_ERROR;\r
     }\r
+    return Status;\r
   } else {\r
     PxeBcParseCachedDhcpPacket (&Private->PxeReply);\r
   }\r
@@ -1278,6 +1279,10 @@ EfiPxeBcMtftp (
     Mode->IcmpErrorReceived = TRUE;\r
   }\r
 \r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
   Status = Private->Udp4Read->Configure (Private->Udp4Read, &Private->Udp4CfgData);\r
   //\r
   // Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP \r