cpufreq: Don't update new_policy on failures

The local variable "new_policy" hasn't been used in the error path of
cpufreq_online() since commit f9f41e3ef9 (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>
This commit is contained in:
Viresh Kumar 2019-01-07 12:28:54 +05:30 committed by Rafael J. Wysocki
parent 1c7fc5cbc3
commit 21469df467
1 changed files with 0 additions and 2 deletions

View 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;
}