]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/configfs/file.c
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
[karo-tx-linux.git] / fs / configfs / file.c
index f499803743e04add3d576dc919e0a54752d00ba1..85105e50f7db668702b36ea78a32feaa6ef12593 100644 (file)
@@ -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;