/* If PrevNode is not NULL, return the previous node. */
STATIC EFI_STATUS EFIAPI AmlIteratorGetPreviousLinear(IN AML_TREE_ITERATOR *Iterator, OUT AML_NODE_HEADER **PrevNode)
/* If PrevNode is not NULL, return the previous node. */
STATIC EFI_STATUS EFIAPI AmlIteratorGetPreviousLinear(IN AML_TREE_ITERATOR *Iterator, OUT AML_NODE_HEADER **PrevNode)
{
  AML_TREE_ITERATOR_INTERNAL  *InternalIterator;
  InternalIterator = (AML_TREE_ITERATOR_INTERNAL *)Iterator;
  if ((InternalIterator == NULL)                              ||
      (InternalIterator->Mode != EAmlIteratorLinear)          ||
      !IS_AML_NODE_VALID (InternalIterator->InitialNode)      ||
      !IS_AML_NODE_VALID (InternalIterator->CurrentNode))
  {
    ASSERT (0);
    return EFI_INVALID_PARAMETER;
  }
  InternalIterator->CurrentNode = AmlGetPreviousNode (
                                    InternalIterator->CurrentNode
                                    );
  if (PrevNode != NULL) {
    *PrevNode = (AML_NODE_HEADER *)InternalIterator->CurrentNode;
  }
  return EFI_SUCCESS;
}