public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] SecurityPkg/TcgStorageOpalLib: Fix retval of OpalGetFeatureDescriptor
@ 2020-07-09  2:38 Gao, Zhichao
  0 siblings, 0 replies; only message in thread
From: Gao, Zhichao @ 2020-07-09  2:38 UTC (permalink / raw)
  To: devel; +Cc: Baranee, Jiewen Yao, Jian J Wang, Chao Zhang

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-09  2:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-09  2:38 [PATCH] SecurityPkg/TcgStorageOpalLib: Fix retval of OpalGetFeatureDescriptor Gao, Zhichao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox