treewide: devm_kzalloc() -> devm_kcalloc()
[linux-2.6-microblaze.git] / drivers / hwmon / nct6775.c
index aebce56..155d4d1 100644 (file)
@@ -1190,12 +1190,12 @@ nct6775_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);