]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
cpufreq: governor: Drop pointless goto from cpufreq_governor_init()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 8 Feb 2016 22:57:22 +0000 (23:57 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 9 Feb 2016 20:34:56 +0000 (21:34 +0100)
It is silly to jump around "return 0", so don't do that.

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

index a3001d8f34bbf8dc1ac727adb40bf0822f8d879e..40edbeacab678a1ac851660dabd9cda27656a728 100644 (file)
@@ -394,12 +394,11 @@ static int cpufreq_governor_init(struct cpufreq_policy *policy)
 
        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())