Commit 3834abb4 authored by Pankaj Gupta's avatar Pankaj Gupta Committed by Rafael J. Wysocki

cpufreq: simplified goto out in cpufreq_register_driver()

simplified goto out in cpufreq_register_driver for increasing
code readability
Signed-off-by: default avatarPankaj Gupta <pankaj.gupta@spreadtrum.com>
Signed-off-by: default avatarSanjeev Yadav <sanjeev.yadav@spreadtrum.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 45482c70
...@@ -2466,10 +2466,7 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data) ...@@ -2466,10 +2466,7 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
register_hotcpu_notifier(&cpufreq_cpu_notifier); register_hotcpu_notifier(&cpufreq_cpu_notifier);
pr_debug("driver %s up and running\n", driver_data->name); pr_debug("driver %s up and running\n", driver_data->name);
goto out;
out:
put_online_cpus();
return ret;
err_if_unreg: err_if_unreg:
subsys_interface_unregister(&cpufreq_interface); subsys_interface_unregister(&cpufreq_interface);
...@@ -2479,7 +2476,9 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data) ...@@ -2479,7 +2476,9 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
write_lock_irqsave(&cpufreq_driver_lock, flags); write_lock_irqsave(&cpufreq_driver_lock, flags);
cpufreq_driver = NULL; cpufreq_driver = NULL;
write_unlock_irqrestore(&cpufreq_driver_lock, flags); write_unlock_irqrestore(&cpufreq_driver_lock, flags);
goto out; out:
put_online_cpus();
return ret;
} }
EXPORT_SYMBOL_GPL(cpufreq_register_driver); EXPORT_SYMBOL_GPL(cpufreq_register_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment