Commit 9430066a authored by Jason Gunthorpe's avatar Jason Gunthorpe Committed by Jarkko Sakkinen

tpm: adjust return value of tpm_read_log

Signed-off-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
parent c4484f79
...@@ -381,7 +381,8 @@ static int tpm_read_log(struct tpm_chip *chip) ...@@ -381,7 +381,8 @@ static int tpm_read_log(struct tpm_chip *chip)
* If an event log is found then the securityfs files are setup to * If an event log is found then the securityfs files are setup to
* export it to userspace, otherwise nothing is done. * export it to userspace, otherwise nothing is done.
* *
* Returns -ENODEV if the firmware has no event log. * Returns -ENODEV if the firmware has no event log or securityfs is not
* supported.
*/ */
int tpm_bios_log_setup(struct tpm_chip *chip) int tpm_bios_log_setup(struct tpm_chip *chip)
{ {
...@@ -432,9 +433,10 @@ int tpm_bios_log_setup(struct tpm_chip *chip) ...@@ -432,9 +433,10 @@ int tpm_bios_log_setup(struct tpm_chip *chip)
return 0; return 0;
err: err:
rc = PTR_ERR(chip->bios_dir[cnt]);
chip->bios_dir[cnt] = NULL; chip->bios_dir[cnt] = NULL;
tpm_bios_log_teardown(chip); tpm_bios_log_teardown(chip);
return -EIO; return rc;
} }
void tpm_bios_log_teardown(struct tpm_chip *chip) void tpm_bios_log_teardown(struct tpm_chip *chip)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment