Commit b16aad35 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

Staging: rtl8712: fix an error test in start_drv_threads()

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 879cb0c9
...@@ -239,7 +239,7 @@ static u32 start_drv_threads(struct _adapter *padapter) ...@@ -239,7 +239,7 @@ static u32 start_drv_threads(struct _adapter *padapter)
{ {
padapter->cmdThread = kthread_run(r8712_cmd_thread, padapter, "%s", padapter->cmdThread = kthread_run(r8712_cmd_thread, padapter, "%s",
padapter->pnetdev->name); padapter->pnetdev->name);
if (IS_ERR(padapter->cmdThread) < 0) if (IS_ERR(padapter->cmdThread))
return _FAIL; return _FAIL;
return _SUCCESS; return _SUCCESS;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment