diff --git a/lib/tpm-common.c b/lib/tpm-common.c index 33fa85926c30e83771221c02c82ae934e2475ff3..43b530865a0c4e7c01d32d66f5f43fe1702afe83 100644 --- a/lib/tpm-common.c +++ b/lib/tpm-common.c @@ -169,7 +169,8 @@ u32 tpm_sendrecv_command(const void *command, void *response, size_t *size_ptr) response, &response_length); if (err < 0) - return TPM_LIB_ERROR; + return err; + if (size_ptr) *size_ptr = response_length;