Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f326ed7 authored by Stefan Berger's avatar Stefan Berger Committed by Rajiv Andrade
Browse files

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: default avatarStefan Berger <stefanb@linux.vnet.ibm.com>
parent 68d6e671
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -614,7 +614,11 @@ static int tpm_tis_init(struct device *dev, resource_size_t start,
		dev_dbg(dev, "\tData Avail Int Support\n");

	/* get the timeouts before testing for irqs */
	tpm_get_timeouts(chip);
	if (tpm_get_timeouts(chip)) {
		dev_err(dev, "Could not get TPM timeouts and durations\n");
		rc = -ENODEV;
		goto out_err;
	}

	if (tpm_do_selftest(chip)) {
		dev_err(dev, "TPM self test failed\n");