]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: unisys/uislib: kthread_create() returns an ERR_PTR
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 7 Mar 2014 11:18:17 +0000 (14:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 9 Mar 2014 06:42:14 +0000 (22:42 -0800)
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>
drivers/staging/unisys/uislib/uisthread.c

index ecf4bfcb34a610478072d42972f594059fdf1ca0..782b06aad56d95e8e35ffa6daa174c0ca051cd86 100644 (file)
@@ -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 */
        }