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

Commit 402149c6 authored by Stefan Berger's avatar Stefan Berger Committed by Jarkko Sakkinen
Browse files

tpm: vtpm_proxy: Suppress error logging when in closed state



Suppress the error logging when the core TPM driver sends commands
to the VTPM proxy driver and -EPIPE is returned in case the VTPM
proxy driver is 'closed' (closed anonymous file descriptor).  This
error code is only returned by the send function and by tpm_transmit
when the VTPM proxy driver is being used.

Signed-off-by: default avatarStefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
parent 5e9fefd2
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -429,8 +429,9 @@ ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space,

	rc = chip->ops->send(chip, (u8 *) buf, count);
	if (rc < 0) {
		if (rc != -EPIPE)
			dev_err(&chip->dev,
			"tpm_transmit: tpm_send: error %d\n", rc);
				"%s: tpm_send: error %d\n", __func__, rc);
		goto out;
	}

+1 −1
Original line number Diff line number Diff line
@@ -840,7 +840,7 @@ void tpm2_shutdown(struct tpm_chip *chip, u16 shutdown_type)
	/* In places where shutdown command is sent there's no much we can do
	 * except print the error code on a system failure.
	 */
	if (rc < 0)
	if (rc < 0 && rc != -EPIPE)
		dev_warn(&chip->dev, "transmit returned %d while stopping the TPM",
			 rc);
}