Merge tag 'backport/v3.14.24-ltsi-rc1/sh-drivers-fixes-20141126' into backport/v3...
[platform/adaptation/renesas_rcar/renesas_kernel.git] / kernel / kthread.c
index b5ae3ee..f6249f9 100644 (file)
@@ -262,7 +262,7 @@ static void create_kthread(struct kthread_create_info *create)
  * kthread_stop() has been called).  The return value should be zero
  * or a negative error number; it will be passed to kthread_stop().
  *
- * Returns a task_struct or ERR_PTR(-ENOMEM).
+ * Returns a task_struct or ERR_PTR(-ENOMEM) or ERR_PTR(-EINTR).
  */
 struct task_struct *kthread_create_on_node(int (*threadfn)(void *data),
                                           void *data, int node,
@@ -298,7 +298,7 @@ struct task_struct *kthread_create_on_node(int (*threadfn)(void *data),
                 * that thread.
                 */
                if (xchg(&create->done, NULL))
-                       return ERR_PTR(-ENOMEM);
+                       return ERR_PTR(-EINTR);
                /*
                 * kthreadd (or new kernel thread) will call complete()
                 * shortly.