]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
MdeModulePkg XhciDxe: Initialize ScratchPhy and ScratchEntryPhy in XhcInitSched().
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / XhciDxe / XhciSched.c
index e5e1b3d802c0873a1b458db8dea1b2d6fa66544b..370d9b81b25dececea36099668bedccbd92d8174 100644 (file)
@@ -525,6 +525,7 @@ XhcInitSched (
     ASSERT (ScratchEntry != NULL);\r
     Xhc->ScratchEntry = ScratchEntry;\r
 \r
+    ScratchPhy = 0;\r
     Status = UsbHcAllocateAlignedPages (\r
                Xhc->PciIo,\r
                EFI_SIZE_TO_PAGES (MaxScratchpadBufs * sizeof (UINT64)),\r
@@ -542,6 +543,7 @@ XhcInitSched (
     // Allocate each scratch buffer\r
     //\r
     for (Index = 0; Index < MaxScratchpadBufs; Index++) {\r
+      ScratchEntryPhy = 0;\r
       Status = UsbHcAllocateAlignedPages (\r
                  Xhc->PciIo,\r
                  EFI_SIZE_TO_PAGES (Xhc->PageSize),\r