- Error code from kthread_run() is now returned in pnpbios_thread_init()
- Remove variable which always was 0.
Signed-off-by: Erik Ekman <erik@kryo.se>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
 
 #ifdef CONFIG_HOTPLUG
 
-static int unloading = 0;
 static struct completion unload_sem;
 
 /*
        int docked = -1, d = 0;
 
        set_freezable();
-       while (!unloading) {
+       while (1) {
                int status;
 
                /*
                struct task_struct *task;
                init_completion(&unload_sem);
                task = kthread_run(pnp_dock_thread, NULL, "kpnpbiosd");
-               if (!IS_ERR(task))
-                       unloading = 0;
+               if (IS_ERR(task))
+                       return PTR_ERR(task);
        }
 #endif
        return 0;