From df9d83a0677741bef779a81362cde98850e767dc Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 20 Dec 2006 11:07:30 -0200 Subject: Msp3400: fix kthread_run error check From: Akinobu Mita The return value of kthread_run() should be checked by IS_ERR(). Signed-off-by: Akinobu Mita Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/msp3400-driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux') diff --git a/linux/drivers/media/video/msp3400-driver.c b/linux/drivers/media/video/msp3400-driver.c index 8ff25e4a8..f03cc0032 100644 --- a/linux/drivers/media/video/msp3400-driver.c +++ b/linux/drivers/media/video/msp3400-driver.c @@ -1027,7 +1027,7 @@ static int msp_attach(struct i2c_adapter *adapter, int address, int kind) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) state->kthread = kthread_run(thread_func, client, "msp34xx"); - if (state->kthread == NULL) + if (IS_ERR(state->kthread)) v4l_warn(client, "kernel_thread() failed\n"); #else DECLARE_MUTEX_LOCKED(sem); -- cgit v1.2.3