summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorXiu Jianfeng <xiujianfeng@huawei.com>2022-03-18 14:02:01 +0800
committerJarkko Sakkinen <jarkko@kernel.org>2022-05-23 18:47:49 +0300
commitd0dc1a7100f19121f6e7450f9cdda11926aa3838 (patch)
treeaf5bf4c6e7066ae8884942a00426f2ffa2d0ac4c /drivers/char
parent80b8a39777a9161d77608ac702c7eeafce5ddce7 (diff)
downloadlinux-d0dc1a7100f19121f6e7450f9cdda11926aa3838.tar.bz2
tpm: ibmvtpm: Correct the return value in tpm_ibmvtpm_probe()
Currently it returns zero when CRQ response timed out, it should return an error code instead. Fixes: d8d74ea3c002 ("tpm: ibmvtpm: Wait for buffer to be set before proceeding") Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Acked-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/tpm/tpm_ibmvtpm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/tpm/tpm_ibmvtpm.c b/drivers/char/tpm/tpm_ibmvtpm.c
index 3af4c07a9342..d3989b257f42 100644
--- a/drivers/char/tpm/tpm_ibmvtpm.c
+++ b/drivers/char/tpm/tpm_ibmvtpm.c
@@ -681,6 +681,7 @@ static int tpm_ibmvtpm_probe(struct vio_dev *vio_dev,
if (!wait_event_timeout(ibmvtpm->crq_queue.wq,
ibmvtpm->rtce_buf != NULL,
HZ)) {
+ rc = -ENODEV;
dev_err(dev, "CRQ response timed out\n");
goto init_irq_cleanup;
}