From: vignesh Date: Wed, 25 Apr 2007 12:13:48 +0000 (+0000) Subject: [CIFS] Replace kmalloc/memset combination with kzalloc X-Git-Tag: v2.6.22-rc1~1010^2~7 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eaa33a9ac04cf5760cf4e661241db19f4151cf06;p=linux-2.6 [CIFS] Replace kmalloc/memset combination with kzalloc Signed-off-by: Vignesh Babu Signed-off-by: Steve French --- diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index 3fab8ed697..b80b0fc1c4 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c @@ -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;