Message ID | 1418883638-26906-1-git-send-email-ethan.zhao@oracle.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
On 18 December 2014 at 11:50, Ethan Zhao <ethan.zhao@oracle.com> wrote: > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > index 4473eba..b75735c 100644 > --- a/drivers/cpufreq/cpufreq.c > +++ b/drivers/cpufreq/cpufreq.c > @@ -2021,6 +2021,11 @@ static int __cpufreq_governor(struct cpufreq_policy *policy, > /* Don't start any governor operations if we are entering suspend */ > if (cpufreq_suspended) > return 0; > + /* Governor might not be initiated here if _PPC changed notification > + * happened, check it. > + */ Its still wrong. /* * Governor might not be initiated here if _PPC changed notification * happened, check it. */ -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 4473eba..b75735c 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -2021,6 +2021,11 @@ static int __cpufreq_governor(struct cpufreq_policy *policy, /* Don't start any governor operations if we are entering suspend */ if (cpufreq_suspended) return 0; + /* Governor might not be initiated here if _PPC changed notification + * happened, check it. + */ + if (!policy->governor) + return -EINVAL; if (policy->governor->max_transition_latency && policy->cpuinfo.transition_latency >