aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>2013-09-06 15:54:06 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-09-09 20:49:48 -0400
commit5136fa56582beadb7fa71eb30bc79148bfcba5c1 (patch)
tree12dc11b371dd0fbfbca20db5cae5f2941c542c33
parent56d07db274b7b15ca38b60ea4a762d40de093000 (diff)
cpufreq: Use signed type for 'ret' variable, to store negative error values
There are places where the variable 'ret' is declared as unsigned int and then used to store negative return values such as -EINVAL. Fix them by declaring the variable as a signed quantity. Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/cpufreq/cpufreq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 2863214c5381..73d53d5a16ee 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -437,7 +437,7 @@ static int __cpufreq_set_policy(struct cpufreq_policy *policy,
437static ssize_t store_##file_name \ 437static ssize_t store_##file_name \
438(struct cpufreq_policy *policy, const char *buf, size_t count) \ 438(struct cpufreq_policy *policy, const char *buf, size_t count) \
439{ \ 439{ \
440 unsigned int ret; \ 440 int ret; \
441 struct cpufreq_policy new_policy; \ 441 struct cpufreq_policy new_policy; \
442 \ 442 \
443 ret = cpufreq_get_policy(&new_policy, policy->cpu); \ 443 ret = cpufreq_get_policy(&new_policy, policy->cpu); \
@@ -490,7 +490,7 @@ static ssize_t show_scaling_governor(struct cpufreq_policy *policy, char *buf)
490static ssize_t store_scaling_governor(struct cpufreq_policy *policy, 490static ssize_t store_scaling_governor(struct cpufreq_policy *policy,
491 const char *buf, size_t count) 491 const char *buf, size_t count)
492{ 492{
493 unsigned int ret; 493 int ret;
494 char str_governor[16]; 494 char str_governor[16];
495 struct cpufreq_policy new_policy; 495 struct cpufreq_policy new_policy;
496 496