diff options
| author | Dave Airlie <airlied@starflyer.(none)> | 2005-09-25 13:14:45 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@linux.ie> | 2005-09-25 13:14:45 +1000 |
| commit | 4e0c1159d83a658d1ffba5bc3442f4ec4cadb436 (patch) | |
| tree | 36a5079ba7ba9b9e0f2f633356705b980940eac4 /kernel/workqueue.c | |
| parent | ea98a92ff18c03bf7f4d21536986cbbcb4c10cd9 (diff) | |
| parent | ef6bd6eb90ad72ee8ee7ba8b271f27102e9a90c1 (diff) | |
update from upstream
Diffstat (limited to 'kernel/workqueue.c')
| -rw-r--r-- | kernel/workqueue.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index c7e36d4a70ca..91bacb13a7e2 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -308,10 +308,9 @@ struct workqueue_struct *__create_workqueue(const char *name, struct workqueue_struct *wq; struct task_struct *p; - wq = kmalloc(sizeof(*wq), GFP_KERNEL); + wq = kzalloc(sizeof(*wq), GFP_KERNEL); if (!wq) return NULL; - memset(wq, 0, sizeof(*wq)); wq->name = name; /* We don't need the distraction of CPUs appearing and vanishing. */ @@ -499,7 +498,7 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb, case CPU_UP_PREPARE: /* Create a new workqueue thread for it. */ list_for_each_entry(wq, &workqueues, list) { - if (create_workqueue_thread(wq, hotcpu) < 0) { + if (!create_workqueue_thread(wq, hotcpu)) { printk("workqueue for %i failed\n", hotcpu); return NOTIFY_BAD; } |
