aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-11 19:10:30 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-11 19:10:30 +0200
commit834d3cd294abd9ad81c6cbaefdda28aa491ceb06 (patch)
treeac7f551b7192bc9236bc45d4641053267733a8e1 /drivers/hwmon
parentMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (diff)
parenttreewide: Replace more open-coded allocation size multiplications (diff)
downloadlinux-dev-834d3cd294abd9ad81c6cbaefdda28aa491ceb06.tar.xz
linux-dev-834d3cd294abd9ad81c6cbaefdda28aa491ceb06.zip
Merge tag 'alloc-args-v4.19-rc8' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Kees writes: "Fix open-coded multiplication arguments to allocators - Fixes several new open-coded multiplications added in the 4.19 merge window." * tag 'alloc-args-v4.19-rc8' of https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: treewide: Replace more open-coded allocation size multiplications
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/npcm750-pwm-fan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/npcm750-pwm-fan.c b/drivers/hwmon/npcm750-pwm-fan.c
index 8474d601aa63..b998f9fbed41 100644
--- a/drivers/hwmon/npcm750-pwm-fan.c
+++ b/drivers/hwmon/npcm750-pwm-fan.c
@@ -908,7 +908,7 @@ static int npcm7xx_en_pwm_fan(struct device *dev,
if (fan_cnt < 1)
return -EINVAL;
- fan_ch = devm_kzalloc(dev, sizeof(*fan_ch) * fan_cnt, GFP_KERNEL);
+ fan_ch = devm_kcalloc(dev, fan_cnt, sizeof(*fan_ch), GFP_KERNEL);
if (!fan_ch)
return -ENOMEM;