Merge tag 'tpmdd-next-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd

Pull tpm updates from Jarkko Sakkinen.

* tag 'tpmdd-next-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd:
  tpm: st33zp24: Fix missing cleanup on get_burstcount() error
  tpm: tpm_i2c_infineon: Fix locality leak on get_burstcount() failure
This commit is contained in:
Linus Torvalds
2026-02-09 10:11:28 -08:00
2 changed files with 8 additions and 4 deletions

View File

@@ -328,8 +328,10 @@ static int st33zp24_send(struct tpm_chip *chip, unsigned char *buf,
for (i = 0; i < len - 1;) {
burstcnt = get_burstcount(chip);
if (burstcnt < 0)
return burstcnt;
if (burstcnt < 0) {
ret = burstcnt;
goto out_err;
}
size = min_t(int, len - i - 1, burstcnt);
ret = tpm_dev->ops->send(tpm_dev->phy_id, TPM_DATA_FIFO,
buf + i, size);

View File

@@ -544,8 +544,10 @@ static int tpm_tis_i2c_send(struct tpm_chip *chip, u8 *buf, size_t bufsiz,
burstcnt = get_burstcount(chip);
/* burstcnt < 0 = TPM is busy */
if (burstcnt < 0)
return burstcnt;
if (burstcnt < 0) {
rc = burstcnt;
goto out_err;
}
if (burstcnt > (len - 1 - count))
burstcnt = len - 1 - count;