diff options
Diffstat (limited to 'drivers/char/tpm/tpm.c')
-rw-r--r-- | drivers/char/tpm/tpm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index 9ca5c021d0b6..361a1dff8f77 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c | |||
@@ -966,6 +966,9 @@ ssize_t tpm_show_durations(struct device *dev, struct device_attribute *attr, | |||
966 | { | 966 | { |
967 | struct tpm_chip *chip = dev_get_drvdata(dev); | 967 | struct tpm_chip *chip = dev_get_drvdata(dev); |
968 | 968 | ||
969 | if (chip->vendor.duration[TPM_LONG] == 0) | ||
970 | return 0; | ||
971 | |||
969 | return sprintf(buf, "%d %d %d [%s]\n", | 972 | return sprintf(buf, "%d %d %d [%s]\n", |
970 | jiffies_to_usecs(chip->vendor.duration[TPM_SHORT]), | 973 | jiffies_to_usecs(chip->vendor.duration[TPM_SHORT]), |
971 | jiffies_to_usecs(chip->vendor.duration[TPM_MEDIUM]), | 974 | jiffies_to_usecs(chip->vendor.duration[TPM_MEDIUM]), |