[PATCH 23/28] V4L/DVB (4996): Msp3400: fix kthread_run error check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Akinobu Mita <[email protected]>

The return value of kthread_run() should be checked by IS_ERR().

Signed-off-by: Akinobu Mita <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/video/msp3400-driver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c
index 295cb99..2fb9fe6 100644
--- a/drivers/media/video/msp3400-driver.c
+++ b/drivers/media/video/msp3400-driver.c
@@ -949,7 +949,7 @@ static int msp_attach(struct i2c_adapter
 	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");

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux