mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 21:21:09 +00:00
[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>
This commit is contained in:
parent
640e803376
commit
dd3927105b
7 changed files with 27 additions and 23 deletions
|
@ -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. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue