From df3a710458462aa9427cdeec947bf71af257e8dd Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 13 Jan 2007 09:25:16 -0300 Subject: [PATCH] V4L/DVB (5073): Fix OOPS on some waitqueue conditions If for some reason vivi_thread() fails, vivi will suffer an OOPS at thread stop code, since waitqueue wouldn't be properly initializated. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/vivi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index cfb6b1f0402..119cfd5ce31 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c @@ -538,7 +538,6 @@ static int vivi_start_thread(struct vivi_dmaqueue *dma_q) dma_q->ini_jiffies=jiffies; dprintk(1,"%s\n",__FUNCTION__); - init_waitqueue_head(&dma_q->wq); dma_q->kthread = kthread_run(vivi_thread, dma_q, "vivi"); @@ -1352,6 +1351,7 @@ static int __init vivi_init(void) /* init video dma queues */ INIT_LIST_HEAD(&dev->vidq.active); INIT_LIST_HEAD(&dev->vidq.queued); + init_waitqueue_head(&dev->vidq.wq); /* initialize locks */ init_MUTEX(&dev->lock); -- 2.20.1