diff options
author | Mark Brown <broonie@kernel.org> | 2021-01-13 20:56:56 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-01-13 20:56:56 +0300 |
commit | cea06d9bf0e035a549226e217022fa51b0c878e5 (patch) | |
tree | a882062da6ee7f1de90a21cc0e717073cc71cb5d /drivers/hwmon/amd_energy.c | |
parent | 9c25af250214e45f6d1c21ff6239a1ffeeedf20e (diff) | |
parent | 7c53f6b671f4aba70ff15e1b05148b10d58c2837 (diff) | |
download | linux-cea06d9bf0e035a549226e217022fa51b0c878e5.tar.xz |
Merge v5.11-rc3
Diffstat (limited to 'drivers/hwmon/amd_energy.c')
-rw-r--r-- | drivers/hwmon/amd_energy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hwmon/amd_energy.c b/drivers/hwmon/amd_energy.c index 9b306448b7a0..822c2e74b98d 100644 --- a/drivers/hwmon/amd_energy.c +++ b/drivers/hwmon/amd_energy.c @@ -222,7 +222,7 @@ static int amd_create_sensor(struct device *dev, */ cpus = num_present_cpus() / num_siblings; - s_config = devm_kcalloc(dev, cpus + sockets, + s_config = devm_kcalloc(dev, cpus + sockets + 1, sizeof(u32), GFP_KERNEL); if (!s_config) return -ENOMEM; @@ -254,6 +254,7 @@ static int amd_create_sensor(struct device *dev, scnprintf(label_l[i], 10, "Esocket%u", (i - cpus)); } + s_config[i] = 0; return 0; } |