diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-02-22 11:18:15 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-20 13:42:58 -0800 |
commit | 58d49283b87751f7af75e021a629dcddb027e8eb (patch) | |
tree | b553643f22a4a216e06c5ab1711a88d3df1e1e6a /fs/sysfs/file.c | |
parent | 03e88ae1b13dfdc8bbaa59b8198e1ca53aad12ac (diff) | |
download | kernel_samsung_smdk4412-58d49283b87751f7af75e021a629dcddb027e8eb.zip kernel_samsung_smdk4412-58d49283b87751f7af75e021a629dcddb027e8eb.tar.gz kernel_samsung_smdk4412-58d49283b87751f7af75e021a629dcddb027e8eb.tar.bz2 |
[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/file.c')
-rw-r--r-- | fs/sysfs/file.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index d0e3d84..e21f402 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c @@ -301,9 +301,8 @@ static int check_perm(struct inode * inode, struct file * file) /* No error? Great, allocate a buffer for the file, and store it * it in file->private_data for easy access. */ - buffer = kmalloc(sizeof(struct sysfs_buffer),GFP_KERNEL); + buffer = kzalloc(sizeof(struct sysfs_buffer), GFP_KERNEL); if (buffer) { - memset(buffer,0,sizeof(struct sysfs_buffer)); init_MUTEX(&buffer->sem); buffer->needs_read_fill = 1; buffer->ops = ops; |