]> err.no Git - linux-2.6/blobdiff - kernel/module.c
V4L/DVB (7267): cx88: Fix: Loads tuner module before sending commands to it
[linux-2.6] / kernel / module.c
index 68d05d2f4d8a9e70dccadefb078284a939342971..5d437bffd8dc7a4219fe471eab6a8699ed08e3df 100644 (file)
@@ -2178,6 +2178,14 @@ sys_init_module(void __user *umod,
                wake_up(&module_wq);
                return ret;
        }
+       if (ret > 0) {
+               printk(KERN_WARNING "%s: '%s'->init suspiciously returned %d, "
+                                   "it should follow 0/-E convention\n"
+                      KERN_WARNING "%s: loading module anyway...\n",
+                      __func__, mod->name, ret,
+                      __func__);
+               dump_stack();
+       }
 
        /* Now it's a first class citizen!  Wake up anyone waiting for it. */
        mod->state = MODULE_STATE_LIVE;