mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
[CIFS] Replace kmalloc/memset combination with kzalloc
Signed-off-by: Vignesh Babu <vignesh.babu@wipro.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
parent
5858ae44e2
commit
eaa33a9ac0
1 changed files with 2 additions and 5 deletions
|
@ -432,14 +432,11 @@ static int initiate_cifs_search(const int xid, struct file *file)
|
||||||
|
|
||||||
if(file->private_data == NULL) {
|
if(file->private_data == NULL) {
|
||||||
file->private_data =
|
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;
|
return -ENOMEM;
|
||||||
} else {
|
|
||||||
memset(file->private_data,0,sizeof(struct cifsFileInfo));
|
|
||||||
}
|
|
||||||
cifsFile = file->private_data;
|
cifsFile = file->private_data;
|
||||||
cifsFile->invalidHandle = TRUE;
|
cifsFile->invalidHandle = TRUE;
|
||||||
cifsFile->srch_inf.endOfSearch = FALSE;
|
cifsFile->srch_inf.endOfSearch = FALSE;
|
||||||
|
|
Loading…
Add table
Reference in a new issue