diff options
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r-- | kernel/workqueue.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 77dabbf64b8f..327d2deb4451 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -1110,7 +1110,7 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb, | |||
1110 | unsigned int cpu = (unsigned long)hcpu; | 1110 | unsigned int cpu = (unsigned long)hcpu; |
1111 | struct cpu_workqueue_struct *cwq; | 1111 | struct cpu_workqueue_struct *cwq; |
1112 | struct workqueue_struct *wq; | 1112 | struct workqueue_struct *wq; |
1113 | int ret = NOTIFY_OK; | 1113 | int err = 0; |
1114 | 1114 | ||
1115 | action &= ~CPU_TASKS_FROZEN; | 1115 | action &= ~CPU_TASKS_FROZEN; |
1116 | 1116 | ||
@@ -1124,12 +1124,13 @@ undo: | |||
1124 | 1124 | ||
1125 | switch (action) { | 1125 | switch (action) { |
1126 | case CPU_UP_PREPARE: | 1126 | case CPU_UP_PREPARE: |
1127 | if (!create_workqueue_thread(cwq, cpu)) | 1127 | err = create_workqueue_thread(cwq, cpu); |
1128 | if (!err) | ||
1128 | break; | 1129 | break; |
1129 | printk(KERN_ERR "workqueue [%s] for %i failed\n", | 1130 | printk(KERN_ERR "workqueue [%s] for %i failed\n", |
1130 | wq->name, cpu); | 1131 | wq->name, cpu); |
1131 | action = CPU_UP_CANCELED; | 1132 | action = CPU_UP_CANCELED; |
1132 | ret = NOTIFY_BAD; | 1133 | err = -ENOMEM; |
1133 | goto undo; | 1134 | goto undo; |
1134 | 1135 | ||
1135 | case CPU_ONLINE: | 1136 | case CPU_ONLINE: |
@@ -1150,7 +1151,7 @@ undo: | |||
1150 | cpumask_clear_cpu(cpu, cpu_populated_map); | 1151 | cpumask_clear_cpu(cpu, cpu_populated_map); |
1151 | } | 1152 | } |
1152 | 1153 | ||
1153 | return ret; | 1154 | return notifier_from_errno(err); |
1154 | } | 1155 | } |
1155 | 1156 | ||
1156 | #ifdef CONFIG_SMP | 1157 | #ifdef CONFIG_SMP |