mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
cpufreq: Use int type to store negative error codes
Change the 'ret' variable in store_scaling_setspeed() from unsigned int to int, as it needs to store either negative error codes or zero returned by kstrtouint(). No effect on runtime. Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Link: https://patch.msgid.link/20250902114545.651661-2-rongqianfeng@vivo.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
committed by
Rafael J. Wysocki
parent
97248d05b7
commit
b49d708495
@@ -914,7 +914,7 @@ static ssize_t store_scaling_setspeed(struct cpufreq_policy *policy,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
unsigned int freq = 0;
|
||||
unsigned int ret;
|
||||
int ret;
|
||||
|
||||
if (!policy->governor || !policy->governor->store_setspeed)
|
||||
return -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user