linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cpufreq: governor: Drop pointless goto from cpufreq_governor_init()
@ 2016-02-08 22:57 Rafael J. Wysocki
  2016-02-09  3:50 ` Viresh Kumar
  0 siblings, 1 reply; 2+ messages in thread
From: Rafael J. Wysocki @ 2016-02-08 22:57 UTC (permalink / raw)
  To: Linux PM list; +Cc: Linux Kernel Mailing List, Viresh Kumar

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

It is silly to jump around "return 0", so don't do that.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.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())

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-09  3:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-08 22:57 [PATCH] cpufreq: governor: Drop pointless goto from cpufreq_governor_init() Rafael J. Wysocki
2016-02-09  3:50 ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).