Commit bcdf6b9f26fe9cd452f5f309a6e410ea4513e60b

Authored by Miquel Raynal
Committed by Tom Rini
1 parent aa643013e4

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>

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

... ... @@ -169,7 +169,8 @@
169 169 response, &response_length);
170 170  
171 171 if (err < 0)
172   - return TPM_LIB_ERROR;
  172 + return err;
  173 +
173 174 if (size_ptr)
174 175 *size_ptr = response_length;
175 176