summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/zte/pinctrl-zx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl/zte/pinctrl-zx.c')
-rw-r--r--drivers/pinctrl/zte/pinctrl-zx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pinctrl/zte/pinctrl-zx.c b/drivers/pinctrl/zte/pinctrl-zx.c
index ded366bb6564..caa44dd2880a 100644
--- a/drivers/pinctrl/zte/pinctrl-zx.c
+++ b/drivers/pinctrl/zte/pinctrl-zx.c
@@ -277,7 +277,7 @@ static int zx_pinctrl_build_state(struct platform_device *pdev)
/* Every single pin composes a group */
ngroups = info->npins;
- groups = devm_kzalloc(&pdev->dev, ngroups * sizeof(*groups),
+ groups = devm_kcalloc(&pdev->dev, ngroups, sizeof(*groups),
GFP_KERNEL);
if (!groups)
return -ENOMEM;
@@ -362,8 +362,8 @@ static int zx_pinctrl_build_state(struct platform_device *pdev)
func = functions + j;
if (!func->group_names) {
- func->group_names = devm_kzalloc(&pdev->dev,
- func->num_group_names *
+ func->group_names = devm_kcalloc(&pdev->dev,
+ func->num_group_names,
sizeof(*func->group_names),
GFP_KERNEL);
if (!func->group_names) {