From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) by mx.groups.io with SMTP id smtpd.web09.3927.1634707283065267307 for ; Tue, 19 Oct 2021 22:21:23 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@google.com header.s=20210112 header.b=a/6f/B6c; spf=pass (domain: flex--moritzf.bounces.google.com, ip: 209.85.219.202, mailfrom: 3uadvyqckbxaacfwhntuccuzs.qcarsjszsryq.ufcidg.wc@flex--moritzf.bounces.google.com) Received: by mail-yb1-f202.google.com with SMTP id y16-20020a2586d0000000b005b752db8f97so28636064ybm.18 for ; Tue, 19 Oct 2021 22:21:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=D2nGUi6IwmHqoJ8Rif85GOqSsyEp/re7XV4aZOFwuns=; b=a/6f/B6cWKv/22AzjnHQwDJfivciu/pNQliJUFRY4iwBXIoIHV92tKkgW9uB70tReH juQtF/IDguJ3V3ifgBzi4+CJZn3YTaDQHF69L0JyCVcDWKmj8lK821EG9hfd/KyCjg59 R7EOwdbOafdN6T5zrMnpN96fu06Ip1fkBE5CVzFH/YjJz0VcCIfzRcxKfTL+ewI8I24b dupj/ZGim1ZeytT0X3wS/1/9P7QBUhbhylR1o51nvQcfebYsei3hSQpYl0Qz/Sk72rYn vsofvgHluMjTuDzRpz2zXGaZanEhrHmiaRRG73IPPXy2iLRgskRrBqDDkViDZGMpm2Ip kI8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=D2nGUi6IwmHqoJ8Rif85GOqSsyEp/re7XV4aZOFwuns=; b=xbi1evQ1AF+2p39a9qBXwb/1BsFMCc3zHH2hRMpUTYcJZGXlO3wrBPnCjL8ofQr0kc tdo9JwkTGVoW6h3JGnIHP/qksvoYQZto7vFoWgMqChrrh9vGUiJsgKqD+0qWxdysUKps JiNccKli0xc8fWY4osALRswVwHzL+G3koNN3U+5MYlcLdKdN+3bGI3jYCcw0DYacPZpK hEvo0cnzgJkqG4cVrsYM3qVXR4KKvgTNXik7xlwr+iY8W5ySfINdqsaqZmx1GOj9adLR utFNWkr4Dc5NNlLy0MJEf5f9elAFVyUO74W9HOprvv+GqQvocM9H5hR+PlbRH6TGNtvF cf8g== X-Gm-Message-State: AOAM532bT/UUoI9ghnTfA+8NKKm0jdrSqmlEDftqFMj04cB3jmS63m4Q qnJkoqk+mSp0+T8FCgMf1K4Ctb5BCKhtPWGSrDWV68jUtA67PQB4IKMix9a3GLJzBHS1Cjc5qtO UmXd4mtGkqjCGUSbuecYMEjmDmh1iu6L2IkOACbqogtJ8ldfSx9oQp8xdGzPIrw== X-Google-Smtp-Source: ABdhPJxpAgM5vwMZeIfk0d7c3AKUOckusNYMA9IIC/+VRchPJApFw3BhfCfkrSx6qWAwVkVQa8YdFBbQf1Uu X-Received: from morats.c.googlers.com ([fda3:e722:ac3:cc00:14:4d90:c0a8:6c]) (user=moritzf job=sendgmr) by 2002:a25:dac5:: with SMTP id n188mr41245008ybf.85.1634707281746; Tue, 19 Oct 2021 22:21:21 -0700 (PDT) Date: Tue, 19 Oct 2021 22:21:18 -0700 Message-Id: <20211020052118.1227640-1-moritzf@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.33.0.1079.g6e70778dc9-goog Subject: [PATCH] DynamicTablesPkg: Fix unitialized variable use From: "Moritz Fischer" To: devel@edk2.groups.io Cc: Sami Mujawar , Alexei Fedorov Content-Type: text/plain; charset="UTF-8" In the success case we should return EFI_SUCCESS rather than returning a potentially unitialized value of Status. Cc: Sami Mujawar Cc: Alexei Fedorov Signed-off-by: Moritz Fischer --- .../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