summaryrefslogtreecommitdiff
path: root/drivers/hwmon/nct6683.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/nct6683.c')
-rw-r--r--drivers/hwmon/nct6683.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/nct6683.c b/drivers/hwmon/nct6683.c
index b0bc77bf2cd9..a753464a1a33 100644
--- a/drivers/hwmon/nct6683.c
+++ b/drivers/hwmon/nct6683.c
@@ -426,12 +426,12 @@ nct6683_create_attr_group(struct device *dev,
if (group == NULL)
return ERR_PTR(-ENOMEM);
- attrs = devm_kzalloc(dev, sizeof(*attrs) * (repeat * count + 1),
+ attrs = devm_kcalloc(dev, repeat * count + 1, sizeof(*attrs),
GFP_KERNEL);
if (attrs == NULL)
return ERR_PTR(-ENOMEM);
- su = devm_kzalloc(dev, sizeof(*su) * repeat * count,
+ su = devm_kzalloc(dev, array3_size(repeat, count, sizeof(*su)),
GFP_KERNEL);
if (su == NULL)
return ERR_PTR(-ENOMEM);