]> git.baikalelectronics.ru Git - kernel.git/commit
tpm: fix wrong return value in tpm_pcr_extend
authorTianjia Zhang <tianjia.zhang@linux.alibaba.com>
Tue, 14 Apr 2020 11:42:26 +0000 (19:42 +0800)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Mon, 20 Apr 2020 21:06:13 +0000 (00:06 +0300)
commitcf5bca5825fcff244c23d535ed39eaac259163e2
treefdce3bd8b3be211f9a10e9dbd86b619de4ee4ec3
parent0db2e57fab120ac224ed6adc942d7e8a1e1d6c29
tpm: fix wrong return value in tpm_pcr_extend

For the algorithm that does not match the bank, a positive
value EINVAL is returned here. I think this is a typo error.
It is necessary to return an error value.

Cc: stable@vger.kernel.org # 5.4.x
Fixes: 2dc09fd6c0c2 ("KEYS: trusted: correctly initialize digests and fix locking issue")
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Reviewed-by: Roberto Sassu <roberto.sassu@huawei.com>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
drivers/char/tpm/tpm-interface.c