V4L/DVB (5871): Conexant 2388x: check for kthread_run
authorCyrill Gorcunov <gorcunov@gmail.com>
Thu, 19 Jul 2007 14:44:11 +0000 (11:44 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 20 Jul 2007 20:35:55 +0000 (17:35 -0300)
The patch adds checking of kthread_run return code and issues a message
if it fails.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/cx88/cx88-video.c

index 98fa35421bdd4d3da05be0b0ad6bdfdcbb9804f5..06b233a7b20bfc3dce4860f6c6d9392ac8759ca0 100644 (file)
@@ -1881,8 +1881,14 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
        mutex_unlock(&core->lock);
 
        /* start tvaudio thread */
-       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);
+               }
+       }
        return 0;
 
 fail_unreg: