public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Moritz Fischer" <moritzf@google.com>
To: devel@edk2.groups.io
Cc: Sami Mujawar <Sami.Mujawar@arm.com>,
	Alexei Fedorov <Alexei.Fedorov@arm.com>
Subject: [PATCH] DynamicTablesPkg: Fix unitialized variable use
Date: Tue, 19 Oct 2021 22:21:18 -0700	[thread overview]
Message-ID: <20211020052118.1227640-1-moritzf@google.com> (raw)

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>
---
 .../Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c
index 0bdb6c24c5bb..e9e1a85ede63 100644
--- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c
+++ b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c
@@ -91,7 +91,7 @@ LinkRdNode (
     *NewRdNode = RdNode;
   }
 
-  return Status;
+  return EFI_SUCCESS;
 
 error_handler:
   Status1 = AmlDeleteTree ((AML_NODE_HEADER*)RdNode);
-- 
2.33.0.1079.g6e70778dc9-goog


             reply	other threads:[~2021-10-20  5:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-20  5:21 Moritz Fischer [this message]
2021-10-20  9:40 ` [PATCH] DynamicTablesPkg: Fix unitialized variable use Sami Mujawar
2021-10-20 10:10   ` Sami Mujawar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211020052118.1227640-1-moritzf@google.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox