]> err.no Git - linux-2.6/commitdiff
V4L/DVB (4996): Msp3400: fix kthread_run error check
authorAkinobu Mita <akinobu.mita@gmail.com>
Wed, 20 Dec 2006 13:07:30 +0000 (10:07 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 27 Dec 2006 16:20:16 +0000 (14:20 -0200)
The return value of kthread_run() should be checked by IS_ERR().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/msp3400-driver.c

index 295cb994beb02b631e63ab2520028c6efc640754..2fb9fe6a1ae75ac39ea0a3865749459962adfeb5 100644 (file)
@@ -949,7 +949,7 @@ static int msp_attach(struct i2c_adapter *adapter, int address, int kind)
        if (thread_func) {
                state->kthread = kthread_run(thread_func, client, "msp34xx");
 
-               if (state->kthread == NULL)
+               if (IS_ERR(state->kthread))
                        v4l_warn(client, "kernel_thread() failed\n");
                msp_wake_thread(client);
        }