Skip to content

Commit

Permalink
V4L/DVB (4995): Vivi: fix kthread_run() error check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Akinobu Mita authored and Mauro Carvalho Chehab committed Dec 27, 2006
1 parent 72f678c commit 054afee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/video/vivi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 054afee

Please sign in to comment.