aboutsummaryrefslogtreecommitdiff
path: root/fs/sysfs/inode.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-02-22 11:18:15 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 13:42:58 -0800
commit58d49283b87751f7af75e021a629dcddb027e8eb (patch)
treeb553643f22a4a216e06c5ab1711a88d3df1e1e6a /fs/sysfs/inode.c
parent03e88ae1b13dfdc8bbaa59b8198e1ca53aad12ac (diff)
[PATCH] sysfs: kzalloc conversion
this converts fs/sysfs to kzalloc() usage. compile tested with make allyesconfig Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/sysfs/inode.c')
-rw-r--r--fs/sysfs/inode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index 6beee6f6a67..4c29ac41ac3 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -54,11 +54,10 @@ int sysfs_setattr(struct dentry * dentry, struct iattr * iattr)
if (!sd_iattr) {
/* setting attributes for the first time, allocate now */
- sd_iattr = kmalloc(sizeof(struct iattr), GFP_KERNEL);
+ sd_iattr = kzalloc(sizeof(struct iattr), GFP_KERNEL);
if (!sd_iattr)
return -ENOMEM;
/* assign default attributes */
- memset(sd_iattr, 0, sizeof(struct iattr));
sd_iattr->ia_mode = sd->s_mode;
sd_iattr->ia_uid = 0;
sd_iattr->ia_gid = 0;