Commit 6aa39ba7 authored by Navya Sri Nizamkari's avatar Navya Sri Nizamkari Committed by Greg Kroah-Hartman

staging: unisys: Use kcalloc instead of kzalloc.

This patch uses kcalloc instead of kzalloc function.
A coccinelle script was used to make this change.
Signed-off-by: default avatarNavya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7aa5d509
...@@ -154,7 +154,7 @@ MYPROCTYPE *visor_proc_CreateType(struct proc_dir_entry *procDirRoot, ...@@ -154,7 +154,7 @@ MYPROCTYPE *visor_proc_CreateType(struct proc_dir_entry *procDirRoot,
type->nProperties++; type->nProperties++;
while (type->name[type->nNames] != NULL) while (type->name[type->nNames] != NULL)
type->nNames++; type->nNames++;
type->procDirs = kzalloc((type->nNames + 1) * type->procDirs = kcalloc((type->nNames + 1),
sizeof(struct proc_dir_entry *), sizeof(struct proc_dir_entry *),
GFP_KERNEL | __GFP_NORETRY); GFP_KERNEL | __GFP_NORETRY);
if (type->procDirs == NULL) if (type->procDirs == NULL)
...@@ -242,12 +242,12 @@ MYPROCOBJECT *visor_proc_CreateObject(MYPROCTYPE *type, ...@@ -242,12 +242,12 @@ MYPROCOBJECT *visor_proc_CreateObject(MYPROCTYPE *type,
goto Away; goto Away;
} }
obj->procDirPropertyContexts = obj->procDirPropertyContexts =
kzalloc((type->nProperties + 1) * kcalloc((type->nProperties + 1),
sizeof(struct proc_dir_entry_context), sizeof(struct proc_dir_entry_context),
GFP_KERNEL | __GFP_NORETRY); GFP_KERNEL | __GFP_NORETRY);
if (obj->procDirPropertyContexts == NULL) if (obj->procDirPropertyContexts == NULL)
goto Away; goto Away;
obj->procDirProperties = kzalloc((type->nProperties + 1) * obj->procDirProperties = kcalloc((type->nProperties + 1),
sizeof(struct proc_dir_entry *), sizeof(struct proc_dir_entry *),
GFP_KERNEL | __GFP_NORETRY); GFP_KERNEL | __GFP_NORETRY);
if (obj->procDirProperties == NULL) if (obj->procDirProperties == NULL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment