[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <121264863.5TXTuENuar@vostro.rjw.lan>
Date: Mon, 08 Feb 2016 23:57:22 +0100
From: "Rafael J. Wysocki" <rjw@...ysocki.net>
To: Linux PM list <linux-pm@...r.kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Viresh Kumar <viresh.kumar@...aro.org>
Subject: [PATCH] cpufreq: governor: Drop pointless goto from cpufreq_governor_init()
From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
It is silly to jump around "return 0", so don't do that.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
---
On top of the bleeding-edge branch of linux-pm.git.
Thanks,
Rafael
---
drivers/cpufreq/cpufreq_governor.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
Index: linux-pm/drivers/cpufreq/cpufreq_governor.c
===================================================================
--- linux-pm.orig/drivers/cpufreq/cpufreq_governor.c
+++ linux-pm/drivers/cpufreq/cpufreq_governor.c
@@ -394,12 +394,11 @@ static int cpufreq_governor_init(struct
ret = sysfs_create_group(get_governor_parent_kobj(policy),
get_sysfs_attr(gov));
- if (ret)
- goto reset_gdbs_data;
+ if (!ret)
+ return 0;
- return 0;
+ /* Failure, so roll back. */
-reset_gdbs_data:
policy->governor_data = NULL;
if (!have_governor_per_policy())
Powered by blists - more mailing lists