Skip to content

Commit

Permalink
tpm_tis: Check return code from getting timeouts/durations
Browse files Browse the repository at this point in the history
Check the return code from getting the TPM's timeouts and durations
and reject the driver if they could not be read.

Signed-off-by: Stefan Berger <[email protected]>
  • Loading branch information
stefanberger authored and srajiv committed Nov 16, 2011
1 parent 68d6e67 commit 7f326ed
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/char/tpm/tpm_tis.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,11 @@ static int tpm_tis_init(struct device *dev, resource_size_t start,
dev_dbg(dev, "\tData Avail Int Support\n");

/* get the timeouts before testing for irqs */
tpm_get_timeouts(chip);
if (tpm_get_timeouts(chip)) {
dev_err(dev, "Could not get TPM timeouts and durations\n");
rc = -ENODEV;
goto out_err;
}

if (tpm_do_selftest(chip)) {
dev_err(dev, "TPM self test failed\n");
Expand Down

0 comments on commit 7f326ed

Please sign in to comment.