X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=SecurityPkg%2FLibrary%2FTcgStorageOpalLib%2FTcgStorageOpalUtil.c;h=f2febc0a0cd19af923dfb4a5fc5868789a6438a5;hb=28ce4cb3590bc3aaa91c3be75429d4e8722415e2;hp=ca8e7fbbdf1f00ece8efe743d62192f6f738dccd;hpb=4b8552d794e7b17a6627e0f752fd298e8bcb2587;p=mirror_edk2.git diff --git a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c index ca8e7fbbdf..f2febc0a0c 100644 --- a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c +++ b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalUtil.c @@ -763,7 +763,6 @@ OpalUtilUpdateGlobalLockingRange( if (MethodStatus == TCG_METHOD_STATUS_CODE_AUTHORITY_LOCKED_OUT) { DEBUG ((DEBUG_INFO, "unlock as admin failed with AUTHORITY_LOCKED_OUT\n")); - goto done; } // @@ -788,7 +787,15 @@ OpalUtilUpdateGlobalLockingRange( done: if (MethodStatus != TCG_METHOD_STATUS_CODE_SUCCESS) { - Ret = TcgResultFailure; + if (MethodStatus == TCG_METHOD_STATUS_CODE_AUTHORITY_LOCKED_OUT) { + // + // Caller need to know this special error, but return status not has type for it. + // so here use TcgResultFailureInvalidType as an replacement. + // + Ret = TcgResultFailureInvalidType; + } else { + Ret = TcgResultFailure; + } } return Ret; }