|
@@ -963,6 +963,9 @@ ssize_t tpm_show_durations(struct device *dev, struct device_attribute *attr,
|
|
|
{
|
|
|
struct tpm_chip *chip = dev_get_drvdata(dev);
|
|
|
|
|
|
+ if (chip->vendor.duration[TPM_LONG] == 0)
|
|
|
+ return 0;
|
|
|
+
|
|
|
return sprintf(buf, "%d %d %d [%s]\n",
|
|
|
jiffies_to_usecs(chip->vendor.duration[TPM_SHORT]),
|
|
|
jiffies_to_usecs(chip->vendor.duration[TPM_MEDIUM]),
|