]> Pileus Git - ~andy/linux/blobdiff - drivers/cpufreq/cpufreq.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
[~andy/linux] / drivers / cpufreq / cpufreq.c
index 5efd5550f4ca7a4afcf1a606d29e293eea5b4c9e..b730d670952957871f2eecf3f35989e673c70855 100644 (file)
@@ -1604,7 +1604,7 @@ static int __cpufreq_set_policy(struct cpufreq_policy *data,
        memcpy(&policy->cpuinfo, &data->cpuinfo,
                                sizeof(struct cpufreq_cpuinfo));
 
-       if (policy->min > data->min && policy->min > policy->max) {
+       if (policy->min > data->max || policy->max < data->min) {
                ret = -EINVAL;
                goto error_out;
        }