aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pwm-fan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/pwm-fan.c')
-rw-r--r--drivers/hwmon/pwm-fan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c
index 70cc0d134f3c..7838af58f92d 100644
--- a/drivers/hwmon/pwm-fan.c
+++ b/drivers/hwmon/pwm-fan.c
@@ -180,7 +180,7 @@ static int pwm_fan_of_get_cooling_data(struct device *dev,
180 } 180 }
181 181
182 num = ret; 182 num = ret;
183 ctx->pwm_fan_cooling_levels = devm_kzalloc(dev, num * sizeof(u32), 183 ctx->pwm_fan_cooling_levels = devm_kcalloc(dev, num, sizeof(u32),
184 GFP_KERNEL); 184 GFP_KERNEL);
185 if (!ctx->pwm_fan_cooling_levels) 185 if (!ctx->pwm_fan_cooling_levels)
186 return -ENOMEM; 186 return -ENOMEM;