Message ID | e5dc9467-16c5-a143-f8d5-4da464cd97f6@users.sourceforge.net (mailing list archive) |
---|---|
State | Rejected |
Headers | show |
diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c index 2458b406f6aa..d552ab7901a7 100644 --- a/drivers/hwmon/nct6775.c +++ b/drivers/hwmon/nct6775.c @@ -1073,13 +1073,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, - GFP_KERNEL); + su = devm_kcalloc(dev, repeat * count, sizeof(*su), GFP_KERNEL); if (su == NULL) return ERR_PTR(-ENOMEM);