* [patch] staging: unisys/uislib: kthread_create() returns an ERR_PTR
@ 2014-03-07 11:18 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2014-03-07 11:18 UTC (permalink / raw)
To: kernel-janitors
kthread_create() returns an ERR_PTR on error, it never returns NULL.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/staging/unisys/uislib/uisthread.c b/drivers/staging/unisys/uislib/uisthread.c
index ecf4bfcb34a6..782b06aad56d 100644
--- a/drivers/staging/unisys/uislib/uisthread.c
+++ b/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 */
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-03-07 11:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-07 11:18 [patch] staging: unisys/uislib: kthread_create() returns an ERR_PTR Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox