summaryrefslogtreecommitdiffstats
path: root/DynamicTablesPkg/Library/Common/AmlLib/Tree/AmlNode.c
diff options
context:
space:
mode:
Diffstat (limited to 'DynamicTablesPkg/Library/Common/AmlLib/Tree/AmlNode.c')
-rw-r--r--DynamicTablesPkg/Library/Common/AmlLib/Tree/AmlNode.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/DynamicTablesPkg/Library/Common/AmlLib/Tree/AmlNode.c b/DynamicTablesPkg/Library/Common/AmlLib/Tree/AmlNode.c
index 3740c0ac7b..300b07a2ef 100644
--- a/DynamicTablesPkg/Library/Common/AmlLib/Tree/AmlNode.c
+++ b/DynamicTablesPkg/Library/Common/AmlLib/Tree/AmlNode.c
@@ -79,7 +79,9 @@ AmlDeleteRootNode (
@param [in] SdtHeader Pointer to an ACPI DSDT/SSDT header to copy
the data from.
- @param [out] NewRootNodePtr The created AML_ROOT_NODE.
+ @param [out] NewRootNodePtr If success, contains the created
+ AML_ROOT_NODE.
+ Otherwise reset to NULL.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_INVALID_PARAMETER Invalid parameter.
@@ -101,6 +103,8 @@ AmlCreateRootNode (
return EFI_INVALID_PARAMETER;
}
+ *NewRootNodePtr = NULL;
+
RootNode = AllocateZeroPool (sizeof (AML_ROOT_NODE));
if (RootNode == NULL) {
ASSERT (0);
@@ -163,7 +167,9 @@ AmlDeleteObjectNode (
@param [in] PkgLength PkgLength of the node if the AmlByteEncoding
has the PkgLen attribute.
0 otherwise.
- @param [out] NewObjectNodePtr The created AML_OBJECT_NODE.
+ @param [out] NewObjectNodePtr If success, contains the created
+ AML_OBJECT_NODE.
+ Otherwise reset to NULL.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_INVALID_PARAMETER Invalid parameter.
@@ -186,6 +192,8 @@ AmlCreateObjectNode (
return EFI_INVALID_PARAMETER;
}
+ *NewObjectNodePtr = NULL;
+
ObjectNode = AllocateZeroPool (sizeof (AML_OBJECT_NODE));
if (ObjectNode == NULL) {
ASSERT (0);
@@ -252,7 +260,9 @@ AmlDeleteDataNode (
this node. Data is copied from there.
@param [in] DataSize Number of bytes to consider at the address
pointed by Data.
- @param [out] NewDataNodePtr The created AML_DATA_NODE.
+ @param [out] NewDataNodePtr If success, contains the created
+ AML_DATA_NODE.
+ Otherwise reset to NULL.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_INVALID_PARAMETER Invalid parameter.
@@ -284,6 +294,8 @@ AmlCreateDataNode (
return EFI_INVALID_PARAMETER;
}
+ *NewDataNodePtr = NULL;
+
DataNode = AllocateZeroPool (sizeof (AML_DATA_NODE));
if (DataNode == NULL) {
ASSERT (0);