From: Akinobu Mita Date: Wed, 20 Dec 2006 13:04:00 +0000 (-0300) Subject: V4L/DVB (4995): Vivi: fix kthread_run() error check X-Git-Tag: v2.6.20-rc3~55^2~6 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=054afee4736677a00982f6414a983dec8ee511db;p=linux-2.6 V4L/DVB (4995): Vivi: fix kthread_run() error check The return value of kthread_run() should be checked by IS_ERR(). Signed-off-by: Akinobu Mita Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index 3cead24a36..bacb311b4f 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c @@ -535,9 +535,9 @@ static int vivi_start_thread(struct vivi_dmaqueue *dma_q) dma_q->kthread = kthread_run(vivi_thread, dma_q, "vivi"); - if (dma_q->kthread == NULL) { + if (IS_ERR(dma_q->kthread)) { printk(KERN_ERR "vivi: kernel_thread() failed\n"); - return -EINVAL; + return PTR_ERR(dma_q->kthread); } dprintk(1,"returning from %s\n",__FUNCTION__); return 0;