提交 9ec5b62c 编写于 作者: X Xiu Jianfeng 提交者: Zheng Zengkai

tpm: ibmvtpm: Correct the return value in tpm_ibmvtpm_probe()

stable inclusion
from stable-v5.10.120
commit ebbbffae71e2e0f322bf9e3fadb62d2bee0c33b3
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5L6BR

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ebbbffae71e2e0f322bf9e3fadb62d2bee0c33b3

--------------------------------

commit d0dc1a71 upstream.

Currently it returns zero when CRQ response timed out, it should return
an error code instead.

Fixes: d8d74ea3 ("tpm: ibmvtpm: Wait for buffer to be set before proceeding")
Signed-off-by: NXiu Jianfeng <xiujianfeng@huawei.com>
Reviewed-by: NStefan Berger <stefanb@linux.ibm.com>
Acked-by: NJarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: NJarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 cf54208e
...@@ -683,6 +683,7 @@ static int tpm_ibmvtpm_probe(struct vio_dev *vio_dev, ...@@ -683,6 +683,7 @@ static int tpm_ibmvtpm_probe(struct vio_dev *vio_dev,
if (!wait_event_timeout(ibmvtpm->crq_queue.wq, if (!wait_event_timeout(ibmvtpm->crq_queue.wq,
ibmvtpm->rtce_buf != NULL, ibmvtpm->rtce_buf != NULL,
HZ)) { HZ)) {
rc = -ENODEV;
dev_err(dev, "CRQ response timed out\n"); dev_err(dev, "CRQ response timed out\n");
goto init_irq_cleanup; goto init_irq_cleanup;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册