
Offering: HULK hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ICU97Y ---------------------------------------------------- The return value of kthread_run() is error pointer, we should use IS_ERR() to check. Fixes: 5bc8dbb5fdf5 ("infiniband/hw/hiroce3: Add Huawei Intelligent Network Card RDMA Driver") Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com> --- drivers/infiniband/hw/hiroce3/dfx/roce_dfx_cap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/hiroce3/dfx/roce_dfx_cap.c b/drivers/infiniband/hw/hiroce3/dfx/roce_dfx_cap.c index cdc75962f03f..3a494263f356 100644 --- a/drivers/infiniband/hw/hiroce3/dfx/roce_dfx_cap.c +++ b/drivers/infiniband/hw/hiroce3/dfx/roce_dfx_cap.c @@ -157,7 +157,7 @@ static int roce3_create_thread(struct sdk_thread_info *thread_info) { thread_info->thread_obj = kthread_run(roce3_linux_thread_func, thread_info, thread_info->name); - if (!thread_info->thread_obj) { + if (IS_ERR(thread_info->thread_obj)) { pr_err("[ROCE, ERR] %s: Failed to create thread\n", __func__); return (-EFAULT); } -- 2.20.1