diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-11-18 01:22:29 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-11-18 01:22:29 +0100 |
commit | bd2a0f6754f18f801ed1e490bf678fc3be013eca (patch) | |
tree | 93c1e594bff4a5cbd553d2df428cefa8e28f42e3 /drivers/cpufreq/cpufreq.c | |
parent | fc14f9c1272f62c3e8d01300f52467c0d9af50f9 (diff) | |
parent | 7e7e8fe69820c6fa31395dbbd8e348e3c69cd2a9 (diff) |
Merge back cpufreq material for 3.19-rc1.
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 4473eba1d6b0..c9701e9e53e4 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -535,7 +535,7 @@ static int cpufreq_set_policy(struct cpufreq_policy *policy, static ssize_t store_##file_name \ (struct cpufreq_policy *policy, const char *buf, size_t count) \ { \ - int ret; \ + int ret, temp; \ struct cpufreq_policy new_policy; \ \ ret = cpufreq_get_policy(&new_policy, policy->cpu); \ @@ -546,8 +546,10 @@ static ssize_t store_##file_name \ if (ret != 1) \ return -EINVAL; \ \ + temp = new_policy.object; \ ret = cpufreq_set_policy(policy, &new_policy); \ - policy->user_policy.object = policy->object; \ + if (!ret) \ + policy->user_policy.object = temp; \ \ return ret ? ret : count; \ } |