From 1e6844dbe4a3475a10c6ef4019ecff8261eee1f2 Mon Sep 17 00:00:00 2001 From: Eric Dong Date: Thu, 7 Apr 2016 21:20:01 +0800 Subject: [PATCH] SecurityPkg TcgStorageOpalLib: Fix wrong condition judgment. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong Reviewed-by: Feng Tian --- SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c index d27a9c9b5f..f77fbe25c1 100644 --- a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c +++ b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c @@ -626,7 +626,7 @@ OpalUtilRevert( // Try to revert with admin1 // Ret = OpalAdminRevert(Session, KeepUserData, &MethodStatus); - if (Ret != TcgResultSuccess || MethodStatus == TCG_METHOD_STATUS_CODE_SUCCESS) { + if (Ret != TcgResultSuccess || MethodStatus != TCG_METHOD_STATUS_CODE_SUCCESS) { // // Device ends the session on successful revert, so only call OpalEndSession when fail. // -- 2.39.2