]> git.proxmox.com Git - mirror_edk2.git/commitdiff
DynamicTablesPkg: Fix unitialized variable use
authorMoritz Fischer <moritzf@google.com>
Wed, 20 Oct 2021 05:21:18 +0000 (22:21 -0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 20 Oct 2021 09:55:52 +0000 (09:55 +0000)
In the success case we should return EFI_SUCCESS rather than returning
a potentially unitialized value of Status.

Cc: Sami Mujawar <Sami.Mujawar@arm.com>
Cc: Alexei Fedorov <Alexei.Fedorov@arm.com>
Signed-off-by: Moritz Fischer <moritzf@google.com>
DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c

index 0bdb6c24c5bb8161e163b60ee7a0558b55510086..e9e1a85ede6330a25c27b6476fcf59b565f72f70 100644 (file)
@@ -91,7 +91,7 @@ LinkRdNode (
     *NewRdNode = RdNode;\r
   }\r
 \r
-  return Status;\r
+  return EFI_SUCCESS;\r
 \r
 error_handler:\r
   Status1 = AmlDeleteTree ((AML_NODE_HEADER*)RdNode);\r