Skip to contentSkip to conversation

staging: unisys/uislib: kthread_create() returns an ERR_PTR

PATCH New Dan Carpenter 1 participant 1 message Mar 7, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: unisys/uislib: kthread_create() returns an ERR_PTR

kthread_create() returns an ERR_PTR on error, it never returns NULL.

drivers/staging/unisys/uislib/uisthread.c +1 -1
index ecf4bfcb34a6..782b06aad56d 100644
@@ -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 */
 	}