]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c
MdeModulePkg EhciPei: Minor refinement about IOMMU
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / EhciPei / EhciUrb.c
index 3dadcd60b6fec69825b64f98fa2d8041ad831ef6..baacf5d56080ec615b1a8efbb7ea64111396f51d 100644 (file)
@@ -576,7 +576,12 @@ EhcCreateUrb (
   if (Urb->Qh == NULL) {\r
     goto ON_ERROR;\r
   }\r
-  \r
+\r
+  Urb->RequestPhy = NULL;\r
+  Urb->RequestMap = NULL;\r
+  Urb->DataPhy  = NULL;\r
+  Urb->DataMap  = NULL;\r
+\r
   //\r
   // Map the request and user data\r
   //\r
@@ -591,9 +596,6 @@ EhcCreateUrb (
 \r
     Urb->RequestPhy = (VOID *) ((UINTN) PhyAddr);\r
     Urb->RequestMap = Map;\r
-  } else {\r
-    Urb->RequestPhy = NULL;\r
-    Urb->RequestMap = NULL;\r
   }\r
 \r
   if (Data != NULL) {\r
@@ -613,9 +615,6 @@ EhcCreateUrb (
 \r
     Urb->DataPhy  = (VOID *) ((UINTN) PhyAddr);\r
     Urb->DataMap  = Map;\r
-  } else {\r
-    Urb->DataPhy  = NULL;\r
-    Urb->DataMap  = NULL;\r
   }\r
 \r
   Status = EhcCreateQtds (Ehc, Urb);\r