Browse Source

V4L/DVB (4996): Msp3400: fix kthread_run error check

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>
Akinobu Mita 18 năm trước cách đây
mục cha
commit
2582140035
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      drivers/media/video/msp3400-driver.c

+ 1 - 1
drivers/media/video/msp3400-driver.c

@@ -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);
 	}