Testing for "if (IS_ERR(padapter->cmdThread) < 0)" doesn't make sense.
The kthread_run() function returns error pointers on error pointers on
error so it should just be "if (IS_ERR(padapter->cmdThread))".
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
{
padapter->cmdThread = kthread_run(r8712_cmd_thread, padapter, "%s",
padapter->pnetdev->name);
- if (IS_ERR(padapter->cmdThread) < 0)
+ if (IS_ERR(padapter->cmdThread))
return _FAIL;
return _SUCCESS;
}