]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/proc/generic.c
proc: use kzalloc instead of kmalloc and memset
[karo-tx-linux.git] / fs / proc / generic.c
index 9e8f631643094a4e82c410c3d1ae5194b2dbe8e5..38de015c0690dc9d038c7fa02195c8af534d2f67 100644 (file)
@@ -616,10 +616,9 @@ static struct proc_dir_entry *__proc_create(struct proc_dir_entry **parent,
 
        len = strlen(fn);
 
-       ent = kmalloc(sizeof(struct proc_dir_entry) + len + 1, GFP_KERNEL);
+       ent = kzalloc(sizeof(struct proc_dir_entry) + len + 1, GFP_KERNEL);
        if (!ent) goto out;
 
-       memset(ent, 0, sizeof(struct proc_dir_entry));
        memcpy(ent->name, fn, len + 1);
        ent->namelen = len;
        ent->mode = mode;