From: Dan Carpenter Date: Fri, 7 Mar 2014 11:18:17 +0000 (+0300) Subject: staging: unisys/uislib: kthread_create() returns an ERR_PTR X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a16a027651359429b7a534edf8b82aac8f6482d5;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Greg Kroah-Hartman --- 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 */ }