From: Viresh Kumar Date: Mon, 7 Jan 2019 06:58:54 +0000 (+0530) Subject: cpufreq: Don't update new_policy on failures X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=21469df4676e89cb9fd4be489d9a2cc4af09db8c;p=linux.git 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 f9f41e3ef99a (cpufreq: Remove policy create/remove notifiers). Don't update it in that error path. Signed-off-by: Viresh Kumar [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index e35a886e00bcf..a8fa684f5f90c 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -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; }