Re: [PATCH] cpufreq: skip cpufreq resume if it's not suspended
From: Viresh Kumar
Date: Mon Feb 05 2018 - 04:23:21 EST
On 05-02-18, 10:19, Rafael J. Wysocki wrote:
> On Tuesday, January 23, 2018 10:57:55 PM CET Bo Yan wrote:
> > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> > index 41d148af7748..95b1c4afe14e 100644
> > --- a/drivers/cpufreq/cpufreq.c
> > +++ b/drivers/cpufreq/cpufreq.c
> > @@ -1680,6 +1680,10 @@ void cpufreq_resume(void)
> > if (!cpufreq_driver)
> > return;
> >
> > + if (unlikely(!cpufreq_suspended)) {
> > + pr_warn("%s: resume after failing suspend\n", __func__);
> > + return;
> > + }
> > cpufreq_suspended = false;
> >
> > if (!has_target() && !cpufreq_driver->resume)
>
> I've just edited this patch somewhat (mostly by dropping the pr_warn())
> and queued it up.
You can add my Ack as well.
Acked-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
--
viresh