diff options
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 25c4c15103a0..8701dc559850 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -843,18 +843,11 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr, | |||
843 | 843 | ||
844 | down_write(&policy->rwsem); | 844 | down_write(&policy->rwsem); |
845 | 845 | ||
846 | /* Updating inactive policies is invalid, so avoid doing that. */ | ||
847 | if (unlikely(policy_is_inactive(policy))) { | ||
848 | ret = -EBUSY; | ||
849 | goto unlock_policy_rwsem; | ||
850 | } | ||
851 | |||
852 | if (fattr->store) | 846 | if (fattr->store) |
853 | ret = fattr->store(policy, buf, count); | 847 | ret = fattr->store(policy, buf, count); |
854 | else | 848 | else |
855 | ret = -EIO; | 849 | ret = -EIO; |
856 | 850 | ||
857 | unlock_policy_rwsem: | ||
858 | up_write(&policy->rwsem); | 851 | up_write(&policy->rwsem); |
859 | unlock: | 852 | unlock: |
860 | put_online_cpus(); | 853 | put_online_cpus(); |