From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web11.3340.1594262322469193827 for ; Wed, 08 Jul 2020 19:38:42 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: zhichao.gao@intel.com) IronPort-SDR: P0TSIX+7Q8r8AULpw7tMwy7o38vAa3jAc3vZqlxUQpV+sV28RRyvF5LwL+W8CCNtfHXhKPUpqi jnhUGW+6eTlw== X-IronPort-AV: E=McAfee;i="6000,8403,9676"; a="136160309" X-IronPort-AV: E=Sophos;i="5.75,330,1589266800"; d="scan'208";a="136160309" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2020 19:38:36 -0700 IronPort-SDR: XP6AOC00GQL9kfcDcrP72mebZoTBFbg2/UNOXaray/T17kZoKOOlBKzEduaIK9PPquKxwwSvXl pp/lYrDVdgWA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,330,1589266800"; d="scan'208";a="283990834" Received: from fieedk001.ccr.corp.intel.com ([10.239.33.114]) by orsmga006.jf.intel.com with ESMTP; 08 Jul 2020 19:38:35 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Baranee , Jiewen Yao , Jian J Wang , Chao Zhang Subject: [PATCH] SecurityPkg/TcgStorageOpalLib: Fix retval of OpalGetFeatureDescriptor Date: Thu, 9 Jul 2020 10:38:18 +0800 Message-Id: <20200709023818.26408-1-zhichao.gao@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Baranee REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2597 OpalGetFeatureDescriptor doesn't return failure if requested FeatureCode is not supported. Cc: Jiewen Yao Cc: Jian J Wang Cc: Chao Zhang Signed-off-by: Zhichao Gao --- 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