Skip to content

Commit

Permalink
staging: unisys/uislib: kthread_create() returns an ERR_PTR
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Mar 9, 2014
1 parent d66b744 commit a16a027
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/unisys/uislib/uisthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
}
Expand Down

0 comments on commit a16a027

Please sign in to comment.