aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/cpu_cooling.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index b4161cfce4a8..a04269de1570 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -458,7 +458,8 @@ struct thermal_cooling_device *cpufreq_cooling_register(
458 return ERR_PTR(-EINVAL); 458 return ERR_PTR(-EINVAL);
459 } 459 }
460 460
461 sprintf(dev_name, "thermal-cpufreq-%d", cpufreq_dev->id); 461 snprintf(dev_name, sizeof(dev_name), "thermal-cpufreq-%d",
462 cpufreq_dev->id);
462 463
463 cool_dev = thermal_cooling_device_register(dev_name, cpufreq_dev, 464 cool_dev = thermal_cooling_device_register(dev_name, cpufreq_dev,
464 &cpufreq_cooling_ops); 465 &cpufreq_cooling_ops);