]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
Reconfigure the UdpRead instance if an error occurred in Dhcp, Discover and Mtftp...
[mirror_edk2.git] / MdeModulePkg / Universal / Network / UefiPxeBcDxe / PxeBcImpl.c
index 6f6d7f92ae58a797e1a181f2357b4190f9a60782..511e064873a246ce93d6a52bcc299e3b818fe458 100644 (file)
@@ -727,7 +727,7 @@ ON_EXIT:
     }\r
   }\r
 \r
-  Status = Private->Udp4Read->Configure (Private->Udp4Read, &Private->Udp4CfgData);\r
+  Private->Udp4Read->Configure (Private->Udp4Read, &Private->Udp4CfgData);\r
 \r
   //\r
   // Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP \r
@@ -1024,7 +1024,7 @@ EfiPxeBcDiscover (
     } else {\r
       Status = EFI_DEVICE_ERROR;\r
     }\r
-    return Status;\r
+    goto ON_EXIT;\r
   } else {\r
     PxeBcParseCachedDhcpPacket (&Private->PxeReply);\r
   }\r
@@ -1043,7 +1043,7 @@ EfiPxeBcDiscover (
 \r
 ON_EXIT:\r
 \r
-  Status = Private->Udp4Read->Configure (Private->Udp4Read, &Private->Udp4CfgData);\r
+  Private->Udp4Read->Configure (Private->Udp4Read, &Private->Udp4CfgData);\r
   \r
   //\r
   // Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP \r
@@ -1280,10 +1280,11 @@ EfiPxeBcMtftp (
   }\r
 \r
   if (EFI_ERROR (Status)) {\r
-    return Status;\r
+    goto ON_EXIT;\r
   }\r
 \r
-  Status = Private->Udp4Read->Configure (Private->Udp4Read, &Private->Udp4CfgData);\r
+ON_EXIT:\r
+  Private->Udp4Read->Configure (Private->Udp4Read, &Private->Udp4CfgData);\r
   //\r
   // Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP \r
   // receive filter list emptied and the filter set to EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP.\r