Staging: rtl8712: fix an error test in start_drv_threads()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 5 Mar 2014 08:43:19 +0000 (11:43 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Mar 2014 19:58:32 +0000 (11:58 -0800)
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>
drivers/staging/rtl8712/os_intfs.c

index 37fe33005c0296e82e071105f06bc57c91b28cfc..6bd08213cb70fcc8d28c6266be4166a932afb20b 100644 (file)
@@ -239,7 +239,7 @@ static u32 start_drv_threads(struct _adapter *padapter)
 {
        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;
 }