DynamicTablesPkg: Update error handling for node creation

The node creation functions:
- AmlCreateRootNode()
- AmlCreateObjectNode()
- AmlCreateDataNode()
are now resetting the input pointer where the created node is stored.
Thus, it is not necessary to set some local variables to NULL or
check a node value before trying to delete it.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
This commit is contained in:
Pierre Gondois
2021-10-08 15:46:19 +01:00
committed by mergify[bot]
parent 2dd7dd3952
commit 37bd08176c
2 changed files with 1 additions and 7 deletions

View File

@@ -43,8 +43,6 @@ AmlCloneNode (
return EFI_INVALID_PARAMETER;
}
*ClonedNode = NULL;
if (IS_AML_DATA_NODE (Node)) {
DataNode = (AML_DATA_NODE*)Node;
Status = AmlCreateDataNode (