[PATCH] fs: Conversions from kmalloc+memset to k(z|c)alloc
Conversions from kmalloc+memset to kzalloc. Signed-off-by: Panagiotis Issaris <takis@issaris.org> Jffs2-bit-acked-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
32c2d2bc4b
commit
f8314dc60c
@@ -274,9 +274,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 configfs_buffer),GFP_KERNEL);
|
||||
buffer = kzalloc(sizeof(struct configfs_buffer),GFP_KERNEL);
|
||||
if (buffer) {
|
||||
memset(buffer,0,sizeof(struct configfs_buffer));
|
||||
init_MUTEX(&buffer->sem);
|
||||
buffer->needs_read_fill = 1;
|
||||
buffer->ops = ops;
|
||||
|
Reference in New Issue
Block a user