aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/params.c
diff options
context:
space:
mode:
authorPekka J Enberg <penberg@cs.Helsinki.FI>2005-09-06 15:18:31 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-07 16:57:45 -0700
commitdd3927105b6f65afb7dac17682172cdfb86d3f00 (patch)
tree5cf282aff500cad23b9d7e13dc19b2b2d31e1ce6 /kernel/params.c
parent640e803376b9c4072f69fec42e304c974a631298 (diff)
downloadkernel_samsung_smdk4412-dd3927105b6f65afb7dac17682172cdfb86d3f00.tar.gz
kernel_samsung_smdk4412-dd3927105b6f65afb7dac17682172cdfb86d3f00.tar.bz2
kernel_samsung_smdk4412-dd3927105b6f65afb7dac17682172cdfb86d3f00.zip
[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/params.c')
-rw-r--r--kernel/params.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/params.c b/kernel/params.c
index d586c35ef8f..fbf173215fd 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -542,8 +542,8 @@ static void __init kernel_param_sysfs_setup(const char *name,
{
struct module_kobject *mk;
- mk = kmalloc(sizeof(struct module_kobject), GFP_KERNEL);
- memset(mk, 0, sizeof(struct module_kobject));
+ mk = kzalloc(sizeof(struct module_kobject), GFP_KERNEL);
+ BUG_ON(!mk);
mk->mod = THIS_MODULE;
kobj_set_kset_s(mk, module_subsys);