浏览代码

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>
Dan Carpenter 11 年之前
父节点
当前提交
a16a027651
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/staging/unisys/uislib/uisthread.c

+ 1 - 1
drivers/staging/unisys/uislib/uisthread.c

@@ -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 */
 	}