X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=QuarkPlatformPkg%2FLibrary%2FTpm12DeviceLibAtmelI2c%2FTisPc.c;h=894e1e3674b519ffeea74a3308ec7f63f07e8c09;hp=3aab5306435a35da87ecb8a52300fa270d65351d;hb=df3f02df1bde40c2a0d486d3ca6bd529c3654049;hpb=39dfd12de48d01023ef293c37f524b8c2137f7c1 diff --git a/QuarkPlatformPkg/Library/Tpm12DeviceLibAtmelI2c/TisPc.c b/QuarkPlatformPkg/Library/Tpm12DeviceLibAtmelI2c/TisPc.c index 3aab530643..894e1e3674 100644 --- a/QuarkPlatformPkg/Library/Tpm12DeviceLibAtmelI2c/TisPc.c +++ b/QuarkPlatformPkg/Library/Tpm12DeviceLibAtmelI2c/TisPc.c @@ -59,6 +59,8 @@ WriteTpmBufferMultiple ( UINTN Index; UINTN PartialLength; + Status = EFI_SUCCESS; + I2CDeviceAddr.I2CDeviceAddress = ATMEL_I2C_TPM_SLAVE_ADDRESS; DEBUG ((EFI_D_VERBOSE, "WriteTpmBufferMultiple: Addr=%02x Length=%02x\n", I2CDeviceAddr.I2CDeviceAddress, Length)); @@ -112,6 +114,8 @@ ReadTpmBufferMultiple ( UINTN Index; UINTN PartialLength; + Status = EFI_SUCCESS; + I2CDeviceAddr.I2CDeviceAddress = ATMEL_I2C_TPM_SLAVE_ADDRESS; WriteLength = 0; @@ -262,6 +266,13 @@ Tpm12SubmitCommand ( INT64 Cycle; INT64 Delta; + // + // Initialize local variables + // + Start = 0; + End = 0; + Total = 0; + // // Make sure response buffer is big enough to hold a response header // @@ -275,13 +286,6 @@ Tpm12SubmitCommand ( // Current = GetPerformanceCounter(); - // - // Initialize local variables - // - Start = 0; - End = 0; - Total = 0; - // // Retrieve the performance counter properties and compute the number of // performance counter ticks required to reach the maximum TIS timeout of