aboutsummaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-sti.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pwm/pwm-sti.c')
-rw-r--r--drivers/pwm/pwm-sti.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-sti.c b/drivers/pwm/pwm-sti.c
index e8fdf96d8cc4..7a7d1c622a17 100644
--- a/drivers/pwm/pwm-sti.c
+++ b/drivers/pwm/pwm-sti.c
@@ -613,7 +613,8 @@ static int sti_pwm_probe(struct platform_device *pdev)
return dev_err_probe(dev, PTR_ERR(pc->cpt_clk),
"failed to get PWM capture clock\n");
- pc->ddata = devm_kzalloc(dev, pc->cpt_num_devs * sizeof(*pc->ddata), GFP_KERNEL);
+ pc->ddata = devm_kcalloc(dev, pc->cpt_num_devs,
+ sizeof(*pc->ddata), GFP_KERNEL);
if (!pc->ddata)
return -ENOMEM;
}