]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.c
IntelSiliconPkg VTdPmrPei: Return SUCCESS when Mapping == NULL in Unmap
[mirror_edk2.git] / IntelSiliconPkg / Feature / VTd / IntelVTdPmrPei / IntelVTdPmrPei.c
index c6a1ccdb1b35d2e77cbcfd2540e496d4987b736c..2b2df1f425aef0041525d5aa90d8485ff02cda90 100644 (file)
@@ -189,7 +189,7 @@ PeiIoMmuMap (
   if (Operation == EdkiiIoMmuOperationBusMasterCommonBuffer ||\r
       Operation == EdkiiIoMmuOperationBusMasterCommonBuffer64) {\r
     *DeviceAddress = (UINTN)HostAddress;\r
-    *Mapping = 0;\r
+    *Mapping = NULL;\r
     return EFI_SUCCESS;\r
   }\r
 \r
@@ -266,7 +266,7 @@ PeiIoMmuUnmap (
   }\r
 \r
   if (Mapping == NULL) {\r
-    return EFI_INVALID_PARAMETER;\r
+    return EFI_SUCCESS;\r
   }\r
 \r
   MapInfo = Mapping;\r