summaryrefslogtreecommitdiff
path: root/drivers/thermal
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/tegra/soctherm.c8
-rw-r--r--drivers/thermal/thermal-generic-adc.c5
2 files changed, 7 insertions, 6 deletions
diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c
index 455b58ce2652..e1fc2b06f343 100644
--- a/drivers/thermal/tegra/soctherm.c
+++ b/drivers/thermal/tegra/soctherm.c
@@ -1343,8 +1343,8 @@ static int tegra_soctherm_probe(struct platform_device *pdev)
return PTR_ERR(tegra->clock_soctherm);
}
- tegra->calib = devm_kzalloc(&pdev->dev,
- sizeof(u32) * soc->num_tsensors,
+ tegra->calib = devm_kcalloc(&pdev->dev,
+ soc->num_tsensors, sizeof(u32),
GFP_KERNEL);
if (!tegra->calib)
return -ENOMEM;
@@ -1363,8 +1363,8 @@ static int tegra_soctherm_probe(struct platform_device *pdev)
return err;
}
- tegra->thermctl_tzs = devm_kzalloc(&pdev->dev,
- sizeof(*z) * soc->num_ttgs,
+ tegra->thermctl_tzs = devm_kcalloc(&pdev->dev,
+ soc->num_ttgs, sizeof(*z),
GFP_KERNEL);
if (!tegra->thermctl_tzs)
return -ENOMEM;
diff --git a/drivers/thermal/thermal-generic-adc.c b/drivers/thermal/thermal-generic-adc.c
index 46d3005335c7..bf1c628d4a7a 100644
--- a/drivers/thermal/thermal-generic-adc.c
+++ b/drivers/thermal/thermal-generic-adc.c
@@ -87,8 +87,9 @@ static int gadc_thermal_read_linear_lookup_table(struct device *dev,
return -EINVAL;
}
- gti->lookup_table = devm_kzalloc(dev, sizeof(*gti->lookup_table) *
- ntable, GFP_KERNEL);
+ gti->lookup_table = devm_kcalloc(dev,
+ ntable, sizeof(*gti->lookup_table),
+ GFP_KERNEL);
if (!gti->lookup_table)
return -ENOMEM;