]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[CIFS] Replace kmalloc/memset combination with kzalloc
authorvignesh <vignesh.babu@wipro.com>
Wed, 25 Apr 2007 12:13:48 +0000 (12:13 +0000)
committerSteve French <sfrench@us.ibm.com>
Wed, 25 Apr 2007 12:13:48 +0000 (12:13 +0000)
Signed-off-by: Vignesh Babu <vignesh.babu@wipro.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/readdir.c

index 3fab8ed697d1542978fdab2abee8078f4108a69b..b80b0fc1c4c43feb79d8b4798966fd73a207dc5c 100644 (file)
@@ -432,14 +432,11 @@ static int initiate_cifs_search(const int xid, struct file *file)
 
        if(file->private_data == NULL) {
                file->private_data = 
-                       kmalloc(sizeof(struct cifsFileInfo),GFP_KERNEL);
+                       kzalloc(sizeof(struct cifsFileInfo),GFP_KERNEL);
        }
 
-       if(file->private_data == NULL) {
+       if(file->private_data == NULL)
                return -ENOMEM;
-       } else {
-               memset(file->private_data,0,sizeof(struct cifsFileInfo));
-       }
        cifsFile = file->private_data;
        cifsFile->invalidHandle = TRUE;
        cifsFile->srch_inf.endOfSearch = FALSE;