diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2018-05-15 11:57:11 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-05-25 20:12:56 -0400 |
commit | bcdf6b9f26fe9cd452f5f309a6e410ea4513e60b (patch) | |
tree | 688e07eb8852ea49073c869aeeb66b67d529beb5 /lib/tpm-common.c | |
parent | aa643013e47b3527b819d1bbdfd1eb679daf5f27 (diff) |
tpm: report driver error code to upper layer
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 <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'lib/tpm-common.c')
-rw-r--r-- | lib/tpm-common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/tpm-common.c b/lib/tpm-common.c index 33fa85926c..43b530865a 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; |