From: Jarkko Sakkinen Date: Tue, 4 Oct 2016 06:49:47 +0000 (+0300) Subject: tpm: remove invalid min length check from tpm_do_selftest() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=befd99656c5eb765fe9d96045c4cba099fd938db;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git tpm: remove invalid min length check from tpm_do_selftest() Removal of this check was not properly amended to the original commit. Cc: stable@vger.kernel.org Fixes: 0c541332231e ("tpm: use tpm_pcr_read_dev() in tpm_do_selftest()") Signed-off-by: Jarkko Sakkinen Signed-off-by: James Morris --- diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c index 8de61876f633..3a9149cf0110 100644 --- a/drivers/char/tpm/tpm-interface.c +++ b/drivers/char/tpm/tpm-interface.c @@ -813,9 +813,6 @@ int tpm_do_selftest(struct tpm_chip *chip) continue; } - if (rc < TPM_HEADER_SIZE) - return -EFAULT; - if (rc == TPM_ERR_DISABLED || rc == TPM_ERR_DEACTIVATED) { dev_info(&chip->dev, "TPM is disabled/deactivated (0x%X)\n", rc);