summaryrefslogtreecommitdiff
path: root/drivers/char/tpm/xen-tpmfront.c
diff options
context:
space:
mode:
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>2019-02-08 19:30:58 +0300
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>2019-02-13 10:46:26 +0300
commitf5595f5baa30e009bf54d0d7653a9a0cc465be60 (patch)
tree87fc6fd0cbd081a44bf6dd96383976a74b625aee /drivers/char/tpm/xen-tpmfront.c
parent6ea3dfe1e0732c5bd3be1e073690b06a83c03c25 (diff)
downloadlinux-f5595f5baa30e009bf54d0d7653a9a0cc465be60.tar.xz
tpm: Unify the send callback behaviour
The send() callback should never return length as it does not in every driver except tpm_crb in the success case. The reason is that the main transmit functionality only cares about whether the transmit was successful or not and ignores the count completely. Suggested-by: Stefan Berger <stefanb@linux.ibm.com> Cc: stable@vger.kernel.org Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com> Tested-by: Alexander Steffen <Alexander.Steffen@infineon.com>
Diffstat (limited to 'drivers/char/tpm/xen-tpmfront.c')
-rw-r--r--drivers/char/tpm/xen-tpmfront.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/tpm/xen-tpmfront.c b/drivers/char/tpm/xen-tpmfront.c
index b150f87f38f5..5a327eb7f63a 100644
--- a/drivers/char/tpm/xen-tpmfront.c
+++ b/drivers/char/tpm/xen-tpmfront.c
@@ -173,7 +173,7 @@ static int vtpm_send(struct tpm_chip *chip, u8 *buf, size_t count)
return -ETIME;
}
- return count;
+ return 0;
}
static int vtpm_recv(struct tpm_chip *chip, u8 *buf, size_t count)