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
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user