mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 12:33:18 -04:00
staging: unisys/uislib: kthread_create() returns an ERR_PTR
kthread_create() returns an ERR_PTR on error, it never returns NULL. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d66b744ac6
commit
a16a027651
@@ -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 */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user