提交 a16a0276 编写于 作者: D Dan Carpenter 提交者: Greg Kroah-Hartman

staging: unisys/uislib: kthread_create() returns an ERR_PTR

kthread_create() returns an ERR_PTR on error, it never returns NULL.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 d66b744a
......@@ -45,7 +45,7 @@ uisthread_start(struct uisthread_info *thrinfo,
/* used to stop the thread */
init_completion(&thrinfo->has_stopped);
thrinfo->task = kthread_create(threadfn, thrcontext, name, NULL);
if (thrinfo->task == NULL) {
if (IS_ERR(thrinfo->task)) {
thrinfo->id = 0;
return 0; /* failure */
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册