cpufreq: e_powersaver: call CPUFREQ_POSTCHANGE notfier in error cases
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 19 Jun 2013 08:52:59 +0000 (14:22 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 24 Jun 2013 11:19:27 +0000 (13:19 +0200)
In case we have started PRECHANGE notifier and found an error, we
must call POSTCHANGE notifier with freqs.new = freqs.old.

This driver does take care of it, but the POSTCHANGE is called with
freqs.new on errors too, which is incorrect, so fix it.

[rjw: Changelog]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/e_powersaver.c

index 324aff20aeeffbfa0f4dae0d5c949c4b7fcb5cf8..a60efaeb4cf8c17291ec97a0ba86bb383fe81d55 100644 (file)
@@ -161,6 +161,9 @@ postchange:
                current_multiplier);
        }
 #endif
+       if (err)
+               freqs.new = freqs.old;
+
        cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
        return err;
 }
This page took 0.03062 seconds and 5 git commands to generate.