aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/cpufreq/cpufreq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 5efd5550f4ca..b730d6709529 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1604,7 +1604,7 @@ static int __cpufreq_set_policy(struct cpufreq_policy *data,
1604 memcpy(&policy->cpuinfo, &data->cpuinfo, 1604 memcpy(&policy->cpuinfo, &data->cpuinfo,
1605 sizeof(struct cpufreq_cpuinfo)); 1605 sizeof(struct cpufreq_cpuinfo));
1606 1606
1607 if (policy->min > data->min && policy->min > policy->max) { 1607 if (policy->min > data->max || policy->max < data->min) {
1608 ret = -EINVAL; 1608 ret = -EINVAL;
1609 goto error_out; 1609 goto error_out;
1610 } 1610 }