diff options
author | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2011-11-11 12:57:05 -0500 |
---|---|---|
committer | Rajiv Andrade <srajiv@linux.vnet.ibm.com> | 2011-11-16 06:43:01 -0500 |
commit | 7f326ed7ff221a109bf89288bf6c8f0142e3e75c (patch) | |
tree | 89e3901917831a53cd3e8c805c9984e9ba5a5f60 /drivers/char/tpm | |
parent | 68d6e6713fcb2ea6278661aaaf5f1c9c821b3751 (diff) |
tpm_tis: Check return code from getting timeouts/durations
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 <stefanb@linux.vnet.ibm.com>
Diffstat (limited to 'drivers/char/tpm')
-rw-r--r-- | drivers/char/tpm/tpm_tis.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index d30d5c3c6c02..34832bc74649 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c | |||
@@ -614,7 +614,11 @@ static int tpm_tis_init(struct device *dev, resource_size_t start, | |||
614 | dev_dbg(dev, "\tData Avail Int Support\n"); | 614 | dev_dbg(dev, "\tData Avail Int Support\n"); |
615 | 615 | ||
616 | /* get the timeouts before testing for irqs */ | 616 | /* get the timeouts before testing for irqs */ |
617 | tpm_get_timeouts(chip); | 617 | if (tpm_get_timeouts(chip)) { |
618 | dev_err(dev, "Could not get TPM timeouts and durations\n"); | ||
619 | rc = -ENODEV; | ||
620 | goto out_err; | ||
621 | } | ||
618 | 622 | ||
619 | if (tpm_do_selftest(chip)) { | 623 | if (tpm_do_selftest(chip)) { |
620 | dev_err(dev, "TPM self test failed\n"); | 624 | dev_err(dev, "TPM self test failed\n"); |