提交 054afee4 编写于 作者: A Akinobu Mita 提交者: Mauro Carvalho Chehab

V4L/DVB (4995): Vivi: fix kthread_run() error check

The return value of kthread_run() should be checked by IS_ERR().
Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 72f678c3
...@@ -535,9 +535,9 @@ static int vivi_start_thread(struct vivi_dmaqueue *dma_q) ...@@ -535,9 +535,9 @@ static int vivi_start_thread(struct vivi_dmaqueue *dma_q)
dma_q->kthread = kthread_run(vivi_thread, dma_q, "vivi"); 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"); printk(KERN_ERR "vivi: kernel_thread() failed\n");
return -EINVAL; return PTR_ERR(dma_q->kthread);
} }
dprintk(1,"returning from %s\n",__FUNCTION__); dprintk(1,"returning from %s\n",__FUNCTION__);
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册