staging: unisys: Use kcalloc instead of kzalloc.
authorNavya Sri Nizamkari <navyasri.tech@gmail.com>
Tue, 10 Mar 2015 12:08:52 +0000 (17:38 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 15 Mar 2015 17:41:08 +0000 (18:41 +0100)
This patch uses kcalloc instead of kzalloc function.
A coccinelle script was used to make this change.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorutil/procobjecttree.c

index 0ba75547b2c5e4df7fd1144cbaccb40bcdbd9841..e4e954ed57ef906e6f8f2f67af7cfcb1b470b3a1 100644 (file)
@@ -154,7 +154,7 @@ MYPROCTYPE *visor_proc_CreateType(struct proc_dir_entry *procDirRoot,
                        type->nProperties++;
        while (type->name[type->nNames] != NULL)
                type->nNames++;
-       type->procDirs = kzalloc((type->nNames + 1) *
+       type->procDirs = kcalloc((type->nNames + 1),
                                 sizeof(struct proc_dir_entry *),
                                 GFP_KERNEL | __GFP_NORETRY);
        if (type->procDirs == NULL)
@@ -242,12 +242,12 @@ MYPROCOBJECT *visor_proc_CreateObject(MYPROCTYPE *type,
                        goto Away;
        }
        obj->procDirPropertyContexts =
-               kzalloc((type->nProperties + 1) *
+               kcalloc((type->nProperties + 1),
                        sizeof(struct proc_dir_entry_context),
                        GFP_KERNEL | __GFP_NORETRY);
        if (obj->procDirPropertyContexts == NULL)
                goto Away;
-       obj->procDirProperties = kzalloc((type->nProperties + 1) *
+       obj->procDirProperties = kcalloc((type->nProperties + 1),
                                         sizeof(struct proc_dir_entry *),
                                         GFP_KERNEL | __GFP_NORETRY);
        if (obj->procDirProperties == NULL)