]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix bug for UefiPxeBcDxe driver to catch the return status.
authorsfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 1 Sep 2011 08:51:00 +0000 (08:51 +0000)
committersfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 1 Sep 2011 08:51:00 +0000 (08:51 +0000)
Signed-off-by: sfu5
Reviewed-by: hhuan13
Reviewed-by: xdu2
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12253 6f19259b-4bc3-4df7-8a09-765794883524

NetworkPkg/UefiPxeBcDxe/PxeBcImpl.c

index 82fddb169ae0a6e14525cb4130637ffd5331e3ae..ae81693bfb5879d55130a956b29e6d70bc2e68c1 100644 (file)
@@ -669,7 +669,9 @@ EfiPxeBcDiscover (
                );\r
   }\r
 \r
                );\r
   }\r
 \r
-  if (!EFI_ERROR (Status)) {\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;    \r
+  } else {\r
     //\r
     // Parse the cached PXE reply packet, and store it into mode data if valid.\r
     //\r
     //\r
     // Parse the cached PXE reply packet, and store it into mode data if valid.\r
     //\r
@@ -937,6 +939,10 @@ EfiPxeBcMtftp (
     Mode->IcmpErrorReceived = TRUE;\r
   }\r
 \r
     Mode->IcmpErrorReceived = TRUE;\r
   }\r
 \r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
   if (Mode->UsingIpv6) {\r
     Status = Private->Udp6Read->Configure (Private->Udp6Read, &Private->Udp6CfgData);    \r
   } else {\r
   if (Mode->UsingIpv6) {\r
     Status = Private->Udp6Read->Configure (Private->Udp6Read, &Private->Udp6CfgData);    \r
   } else {\r