Skip to content

Commit

Permalink
tpm: report driver error code to upper layer
Browse files Browse the repository at this point in the history
Instead of returning a generic 'library' error, report back the actual
error code so it can be displayed to the user by the regular error path.

Signed-off-by: Miquel Raynal <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
  • Loading branch information
miquelraynal authored and trini committed May 26, 2018
1 parent aa64301 commit bcdf6b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/tpm-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit bcdf6b9

Please sign in to comment.