From: Eric Dong Date: Thu, 7 Apr 2016 13:20:01 +0000 (+0800) Subject: SecurityPkg TcgStorageOpalLib: Fix wrong condition judgment. X-Git-Tag: edk2-stable201903~7379 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=1e6844dbe4a3475a10c6ef4019ecff8261eee1f2 SecurityPkg TcgStorageOpalLib: Fix wrong condition judgment. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong Reviewed-by: Feng Tian --- 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. //