From 9e503f7f1dbe325edf739b32136d74774c6e8ae2 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 19 Jul 2007 11:44:11 -0300 Subject: Conexant 2388x: check for kthread_run From: Cyrill Gorcunov The patch adds checking of kthread_run return code and issues a message if it fails. Signed-off-by: Cyrill Gorcunov Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/cx88/cx88-video.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'linux/drivers/media/video/cx88/cx88-video.c') diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 612c8393f..15273bbe6 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -2175,8 +2175,14 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev, /* start tvaudio thread */ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) - if (core->tuner_type != TUNER_ABSENT) + if (core->tuner_type != TUNER_ABSENT) { core->kthread = kthread_run(cx88_audio_thread, core, "cx88 tvaudio"); + if (IS_ERR(core->kthread)) { + err = PTR_ERR(core->kthread); + printk(KERN_ERR "Failed to create cx88 audio thread, err=%d\n", + err); + } + } #else /*FIXME: Not sure if this will work */ if (core->tuner_type != TUNER_ABSENT) -- cgit v1.2.3