aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
authorPekka J Enberg <penberg@cs.Helsinki.FI>2005-09-06 18:18:31 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-07 19:57:45 -0400
commitdd3927105b6f65afb7dac17682172cdfb86d3f00 (patch)
tree5cf282aff500cad23b9d7e13dc19b2b2d31e1ce6 /kernel/workqueue.c
parent640e803376b9c4072f69fec42e304c974a631298 (diff)
[PATCH] introduce and use kzalloc
This patch introduces a kzalloc wrapper and converts kernel/ to use it. It saves a little program text. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r--kernel/workqueue.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index a3de837a8ddd..91bacb13a7e2 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -308,10 +308,9 @@ struct workqueue_struct *__create_workqueue(const char *name,
308 struct workqueue_struct *wq; 308 struct workqueue_struct *wq;
309 struct task_struct *p; 309 struct task_struct *p;
310 310
311 wq = kmalloc(sizeof(*wq), GFP_KERNEL); 311 wq = kzalloc(sizeof(*wq), GFP_KERNEL);
312 if (!wq) 312 if (!wq)
313 return NULL; 313 return NULL;
314 memset(wq, 0, sizeof(*wq));
315 314
316 wq->name = name; 315 wq->name = name;
317 /* We don't need the distraction of CPUs appearing and vanishing. */ 316 /* We don't need the distraction of CPUs appearing and vanishing. */