提交 eaa33a9a 编写于 作者: V vignesh 提交者: Steve French

[CIFS] Replace kmalloc/memset combination with kzalloc

Signed-off-by: NVignesh Babu <vignesh.babu@wipro.com>
Signed-off-by: NSteve French <sfrench@us.ibm.com>
上级 5858ae44
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册