AsyncRequestPtr maybe NULL after its callback function is invoke. So Caching it tempo...
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 11 Jan 2007 07:06:00 +0000 (07:06 +0000)
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 11 Jan 2007 07:06:00 +0000 (07:06 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2217 6f19259b-4bc3-4df7-8a09-765794883524

EdkModulePkg/Bus/Pci/Ehci/Dxe/EhciSched.c

index 1226d56..1a94705 100644 (file)
@@ -2997,6 +2997,7 @@ Returns:
   UINT32              TransferResult;\r
   UINT8               *ReceiveBuffer;\r
   UINT8               *ProcessBuffer;\r
+  EHCI_ASYNC_REQUEST  *NextPtr;\r
 \r
   Status          = EFI_SUCCESS;\r
   QtdHwPtr        = NULL;\r
@@ -3042,6 +3043,8 @@ Returns:
 \r
     UpdateAsyncRequestTransfer (AsyncRequestPtr, TransferResult, ErrQtdPos);\r
 \r
+    NextPtr = AsyncRequestPtr->Next;\r
+\r
     if (EFI_USB_NOERROR == TransferResult) {\r
 \r
       if (AsyncRequestPtr->CallBackFunc != NULL) {\r
@@ -3069,8 +3072,7 @@ Returns:
       gBS->FreePool (ProcessBuffer);\r
     }\r
 \r
-    AsyncRequestPtr = AsyncRequestPtr->Next;\r
-\r
+    AsyncRequestPtr = NextPtr;\r
   }\r
 \r
 exit:\r