summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pmbus
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/pmbus')
-rw-r--r--drivers/hwmon/pmbus/pmbus_core.c4
-rw-r--r--drivers/hwmon/pmbus/ucd9000.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
index f7c47d7..82c3754 100644
--- a/drivers/hwmon/pmbus/pmbus_core.c
+++ b/drivers/hwmon/pmbus/pmbus_core.c
@@ -2176,8 +2176,8 @@ static int pmbus_init_debugfs(struct i2c_client *client,
}
/* Allocate the max possible entries we need. */
- entries = devm_kzalloc(data->dev,
- sizeof(*entries) * (data->info->pages * 10),
+ entries = devm_kcalloc(data->dev,
+ data->info->pages * 10, sizeof(*entries),
GFP_KERNEL);
if (!entries)
return -ENOMEM;
diff --git a/drivers/hwmon/pmbus/ucd9000.c b/drivers/hwmon/pmbus/ucd9000.c
index 70cecb0..ae93885 100644
--- a/drivers/hwmon/pmbus/ucd9000.c
+++ b/drivers/hwmon/pmbus/ucd9000.c
@@ -454,8 +454,8 @@ static int ucd9000_init_debugfs(struct i2c_client *client,
*/
if (mid->driver_data == ucd9090 || mid->driver_data == ucd90160 ||
mid->driver_data == ucd90910) {
- entries = devm_kzalloc(&client->dev,
- sizeof(*entries) * UCD9000_GPI_COUNT,
+ entries = devm_kcalloc(&client->dev,
+ UCD9000_GPI_COUNT, sizeof(*entries),
GFP_KERNEL);
if (!entries)
return -ENOMEM;
OpenPOWER on IntegriCloud