Commit a16a0276 authored by Dan Carpenter's avatar Dan Carpenter Committed by 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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d66b744a
...@@ -45,7 +45,7 @@ uisthread_start(struct uisthread_info *thrinfo, ...@@ -45,7 +45,7 @@ uisthread_start(struct uisthread_info *thrinfo,
/* used to stop the thread */ /* used to stop the thread */
init_completion(&thrinfo->has_stopped); init_completion(&thrinfo->has_stopped);
thrinfo->task = kthread_create(threadfn, thrcontext, name, NULL); thrinfo->task = kthread_create(threadfn, thrcontext, name, NULL);
if (thrinfo->task == NULL) { if (IS_ERR(thrinfo->task)) {
thrinfo->id = 0; thrinfo->id = 0;
return 0; /* failure */ return 0; /* failure */
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment