Message ID | 20200604134713.157951-7-amirmizi6@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | Add tpm i2c ptp driver | expand |
diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index 9d90b9a..8868fe0 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -221,8 +221,14 @@ static int request_locality(struct tpm_chip *chip, int l) } else { /* wait for burstcount */ do { - if (check_locality(chip, l)) + if (check_locality(chip, l)) { + if (wait_for_tpm_stat(chip, TPM_STS_GO, 0, + chip->timeout_c, + &priv->int_queue, + false) < 0) + return -ETIME; return l; + } tpm_msleep(TPM_TIMEOUT); } while (time_before(jiffies, stop)); }