[PATCH] kernel core: replace kmalloc+memset with kzalloc

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Burman Yan
2006-12-06 20:38:51 -08:00
committed by Linus Torvalds
parent 304e61e6fb
commit 4668edc334
6 changed files with 7 additions and 14 deletions

View File

@@ -111,10 +111,9 @@ char *kobject_get_path(struct kobject *kobj, gfp_t gfp_mask)
len = get_kobj_path_length(kobj);
if (len == 0)
return NULL;
path = kmalloc(len, gfp_mask);
path = kzalloc(len, gfp_mask);
if (!path)
return NULL;
memset(path, 0x00, len);
fill_kobj_path(kobj, path, len);
return path;