summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/pwm/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index bc0c20ac90a1..2a1a2d566e39 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -255,7 +255,7 @@ int pwmchip_add_with_polarity(struct pwm_chip *chip,
if (ret < 0)
goto out;
- chip->pwms = kzalloc(chip->npwm * sizeof(*pwm), GFP_KERNEL);
+ chip->pwms = kcalloc(chip->npwm, sizeof(*pwm), GFP_KERNEL);
if (!chip->pwms) {
ret = -ENOMEM;
goto out;