/** @file \r
TIS (TPM Interface Specification) functions used by TPM Dxe driver.\r
\r
-Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
if (*Fmt == '/') break;\r
Status = TisPcSendV (*Fmt, &Ap, TpmCommandBuf, &BufSize);\r
if (EFI_ERROR( Status )) {\r
- return Status;\r
+ goto Error;\r
}\r
Fmt++;\r
}\r
// Ensure the TPM state change from "Reception" to "Idle/Ready"\r
//\r
MmioWrite8 ((UINTN) &(((TIS_PC_REGISTERS_PTR) TisReg)->Status), TIS_PC_STS_READY);\r
- return Status; \r
+ goto Error;\r
}\r
\r
MmioWrite8 ((UINTN) &(((TIS_PC_REGISTERS_PTR) TisReg)->Status), TIS_PC_STS_GO);\r
//\r
MmioWrite8 ((UINTN) &(((TIS_PC_REGISTERS_PTR) TisReg)->Status), TIS_PC_STS_READY);\r
if (EFI_ERROR (Status)) {\r
- return Status;\r
+ goto Error;\r
}\r
\r
//\r
}\r
Status = TisPcReceiveV (*Fmt, &Ap, TpmCommandBuf, &BufSize, ResponseSize, &DataFinished);\r
if (EFI_ERROR (Status)) {\r
- return Status;\r
+ goto Error;\r
}\r
if (DataFinished) {\r
+ VA_END (Ap);\r
return EFI_SUCCESS;\r
}\r
Fmt++;\r
}\r
\r
+Error:\r
VA_END (Ap);\r
return Status;\r
}\r