]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Universal/Network/Snp32_64/Dxe/snp.c
Clean up the following module msa files, they are three networt and two PCD modules.
[mirror_edk2.git] / EdkModulePkg / Universal / Network / Snp32_64 / Dxe / snp.c
index 4b6cda9b1e5c43ba896521f84f4a75f9a33f11a2..a32812a01a6b0c5a318a5e3aa4c192241a5f5c8c 100644 (file)
@@ -1,5 +1,5 @@
 /*++\r
-Copyright (c) 2006, Intel Corporation\r
+Copyright (c) 2006 - 2007, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -1081,14 +1081,9 @@ Returns:
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  Status = gBS->AllocatePool (\r
-                  EfiBootServicesData,\r
-                  sizeof (struct s_v2p),\r
-                  (VOID **) v2p\r
-                  );\r
-\r
-  if (Status != EFI_SUCCESS) {\r
-    return Status;\r
+  *v2p = AllocatePool (sizeof (struct s_v2p));\r
+  if (*v2p != NULL) {\r
+    return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r
   Status = mPciIoFncs->Map (\r
@@ -1100,7 +1095,7 @@ Returns:
                         &(*v2p)->unmap\r
                         );\r
   if (Status != EFI_SUCCESS) {\r
-    gBS->FreePool (*v2p);\r
+    FreePool (*v2p);\r
     return Status;\r
   }\r
   (*v2p)->vaddr = vaddr;\r
@@ -1189,7 +1184,7 @@ Returns:
 \r
     Status  = mPciIoFncs->Unmap (mPciIoFncs, v->unmap);\r
 \r
-    gBS->FreePool (v);\r
+    FreePool (v);\r
 \r
     if (Status) {\r
       DEBUG ((EFI_D_ERROR, "Unmap failed with status = %x\n", Status));\r
@@ -1201,7 +1196,7 @@ Returns:
     if ((t = v->next)->vaddr == vaddr) {\r
       v->next = t->next;\r
       Status  = mPciIoFncs->Unmap (mPciIoFncs, t->unmap);\r
-      gBS->FreePool (t);\r
+      FreePool (t);\r
 \r
       if (Status) {\r
         DEBUG ((EFI_D_ERROR, "Unmap failed with status = %x\n", Status));\r