Skip to content

Commit

Permalink
[CIFS] Replace kmalloc/memset combination with kzalloc
Browse files Browse the repository at this point in the history
Signed-off-by: Vignesh Babu <vignesh.babu@wipro.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
  • Loading branch information
vignesh authored and Steve French committed Apr 25, 2007
1 parent 5858ae4 commit eaa33a9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions fs/cifs/readdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit eaa33a9

Please sign in to comment.