diff options
author | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | 2019-02-08 17:30:58 +0100 |
---|---|---|
committer | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | 2019-02-13 08:46:26 +0100 |
commit | f5595f5baa30e009bf54d0d7653a9a0cc465be60 (patch) | |
tree | 87fc6fd0cbd081a44bf6dd96383976a74b625aee /drivers/char/tpm/tpm_i2c_nuvoton.c | |
parent | selftests: add TPM 2.0 tests (diff) | |
download | linux-f5595f5baa30e009bf54d0d7653a9a0cc465be60.tar.xz linux-f5595f5baa30e009bf54d0d7653a9a0cc465be60.zip |
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/tpm_i2c_nuvoton.c')
-rw-r--r-- | drivers/char/tpm/tpm_i2c_nuvoton.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm_i2c_nuvoton.c b/drivers/char/tpm/tpm_i2c_nuvoton.c index 5700cc2ddee1..315a3b4548f7 100644 --- a/drivers/char/tpm/tpm_i2c_nuvoton.c +++ b/drivers/char/tpm/tpm_i2c_nuvoton.c @@ -465,7 +465,7 @@ static int i2c_nuvoton_send(struct tpm_chip *chip, u8 *buf, size_t len) } dev_dbg(dev, "%s() -> %zd\n", __func__, len); - return len; + return 0; } static bool i2c_nuvoton_req_canceled(struct tpm_chip *chip, u8 status) |