treewide: devm_kzalloc() -> devm_kcalloc()
[linux-2.6-microblaze.git] / drivers / pinctrl / sunxi / pinctrl-sunxi.c
index eaace8e..4d9bf9b 100644 (file)
@@ -1055,8 +1055,8 @@ static int sunxi_pinctrl_build_state(struct platform_device *pdev)
         * this means that the number of pins is the maximum group
         * number we will ever see.
         */
-       pctl->groups = devm_kzalloc(&pdev->dev,
-                                   pctl->desc->npins * sizeof(*pctl->groups),
+       pctl->groups = devm_kcalloc(&pdev->dev,
+                                   pctl->desc->npins, sizeof(*pctl->groups),
                                    GFP_KERNEL);
        if (!pctl->groups)
                return -ENOMEM;
@@ -1079,8 +1079,9 @@ static int sunxi_pinctrl_build_state(struct platform_device *pdev)
         * We suppose that we won't have any more functions than pins,
         * we'll reallocate that later anyway
         */
-       pctl->functions = devm_kzalloc(&pdev->dev,
-                                      pctl->ngroups * sizeof(*pctl->functions),
+       pctl->functions = devm_kcalloc(&pdev->dev,
+                                      pctl->ngroups,
+                                      sizeof(*pctl->functions),
                                       GFP_KERNEL);
        if (!pctl->functions)
                return -ENOMEM;
@@ -1137,8 +1138,9 @@ static int sunxi_pinctrl_build_state(struct platform_device *pdev)
 
                        if (!func_item->groups) {
                                func_item->groups =
-                                       devm_kzalloc(&pdev->dev,
-                                                    func_item->ngroups * sizeof(*func_item->groups),
+                                       devm_kcalloc(&pdev->dev,
+                                                    func_item->ngroups,
+                                                    sizeof(*func_item->groups),
                                                     GFP_KERNEL);
                                if (!func_item->groups)
                                        return -ENOMEM;
@@ -1281,8 +1283,8 @@ int sunxi_pinctrl_init_with_variant(struct platform_device *pdev,
                return ret;
        }
 
-       pins = devm_kzalloc(&pdev->dev,
-                           pctl->desc->npins * sizeof(*pins),
+       pins = devm_kcalloc(&pdev->dev,
+                           pctl->desc->npins, sizeof(*pins),
                            GFP_KERNEL);
        if (!pins)
                return -ENOMEM;