public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Zhichao" <zhichao.gao@intel.com>
To: devel@edk2.groups.io
Cc: Baranee <anbazhagan@hp.com>, Jiewen Yao <jiewen.yao@intel.com>,
	Jian J Wang <jian.j.wang@intel.com>,
	Chao Zhang <chao.b.zhang@intel.com>
Subject: [PATCH] SecurityPkg/TcgStorageOpalLib: Fix retval of OpalGetFeatureDescriptor
Date: Thu,  9 Jul 2020 10:38:18 +0800	[thread overview]
Message-ID: <20200709023818.26408-1-zhichao.gao@intel.com> (raw)

From: Baranee <anbazhagan@hp.com>

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2597

OpalGetFeatureDescriptor doesn't return failure if requested
FeatureCode is not supported.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
 SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c
index b58597e61f..873ca1909b 100644
--- a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c
+++ b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c
@@ -1892,9 +1892,10 @@ OpalGetFeatureDescriptor (
 
     *DataSize = Size;
     CopyMem (Data, Feat, Size);
+    return TcgResultSuccess;
   }
 
-  return TcgResultSuccess;
+  return TcgResultFailure;
 }
 
 /**
-- 
2.21.0.windows.1


                 reply	other threads:[~2020-07-09  2:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20200709023818.26408-1-zhichao.gao@intel.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