cpufreq: Don't update new_policy on failures
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 7 Jan 2019 06:58:54 +0000 (12:28 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 15 Jan 2019 21:57:04 +0000 (22:57 +0100)
The local variable "new_policy" hasn't been used in the error path of
cpufreq_online() since commit f9f41e3ef99a (cpufreq: Remove policy
create/remove notifiers).  Don't update it in that error path.

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

index e35a886e00bcf1d18f9683dd7f1a68a7569d4535..a8fa684f5f90cd31e846bbc75ee1127a50fc15a2 100644 (file)
@@ -1305,8 +1305,6 @@ static int cpufreq_online(unsigned int cpu)
        if (ret) {
                pr_err("%s: Failed to initialize policy for cpu: %d (%d)\n",
                       __func__, cpu, ret);
-               /* cpufreq_policy_free() will notify based on this */
-               new_policy = false;
                goto out_destroy_policy;
        }