mirror of https://github.com/acidanthera/audk.git
Fix a bug about linked list manipulation in DegradeResource() in PCI bus driver.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9622 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
de028a62de
commit
4661d5df04
|
@ -1050,6 +1050,7 @@ DegradeResource (
|
|||
PCI_IO_DEVICE *Temp;
|
||||
LIST_ENTRY *ChildDeviceLink;
|
||||
LIST_ENTRY *ChildNodeLink;
|
||||
LIST_ENTRY *NextChildNodeLink;
|
||||
PCI_RESOURCE_NODE *TempNode;
|
||||
|
||||
//
|
||||
|
@ -1064,12 +1065,13 @@ DegradeResource (
|
|||
ChildNodeLink = Mem64Node->ChildList.ForwardLink;
|
||||
while (ChildNodeLink != &Mem64Node->ChildList) {
|
||||
TempNode = RESOURCE_NODE_FROM_LINK (ChildNodeLink);
|
||||
NextChildNodeLink = ChildNodeLink->ForwardLink;
|
||||
|
||||
if (TempNode->PciDev == Temp) {
|
||||
RemoveEntryList (ChildNodeLink);
|
||||
InsertResourceNode (Mem32Node, TempNode);
|
||||
}
|
||||
ChildNodeLink = TempNode->Link.ForwardLink;
|
||||
ChildNodeLink = NextChildNodeLink;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1077,12 +1079,13 @@ DegradeResource (
|
|||
ChildNodeLink = PMem64Node->ChildList.ForwardLink;
|
||||
while (ChildNodeLink != &PMem64Node->ChildList) {
|
||||
TempNode = RESOURCE_NODE_FROM_LINK (ChildNodeLink);
|
||||
NextChildNodeLink = ChildNodeLink->ForwardLink;
|
||||
|
||||
if (TempNode->PciDev == Temp) {
|
||||
RemoveEntryList (ChildNodeLink);
|
||||
InsertResourceNode (PMem32Node, TempNode);
|
||||
}
|
||||
ChildNodeLink = TempNode->Link.ForwardLink;
|
||||
ChildNodeLink = NextChildNodeLink;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue