Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1401442 > unrolled thread
| Started by | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| First post | 2016-05-16 13:20 +0200 |
| Last post | 2016-05-16 13:20 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] driver: cpufreq: simplified goto out in cpufreq_register_driver Viresh Kumar <viresh.kumar@linaro.org> - 2016-05-16 13:20 +0200
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Date | 2016-05-16 13:20 +0200 |
| Subject | Re: [PATCH] driver: cpufreq: simplified goto out in cpufreq_register_driver |
| Message-ID | <rzoJ4-6ey-21@gated-at.bofh.it> |
On 16-05-16, 11:07, Pankaj Gupta (Pankaj Gupta) wrote:
> simplified goto out in cpufreq_register_driver for increasing
> code readability
>
> Signed-off-by: Pankaj Gupta <pankaj.gupta@spreadtrum.com>
> Signed-off-by: Sanjeev Yadav <sanjeev.yadav@spreadtrum.com>
> ---
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index b87596b..0bc23f6 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -2370,10 +2370,7 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
>
> register_hotcpu_notifier(&cpufreq_cpu_notifier);
> pr_debug("driver %s up and running\n", driver_data->name);
> -
> -out:
> - put_online_cpus();
> - return ret;
> + goto out;
>
> err_if_unreg:
> subsys_interface_unregister(&cpufreq_interface);
> @@ -2383,7 +2380,9 @@ err_null_driver:
> write_lock_irqsave(&cpufreq_driver_lock, flags);
> cpufreq_driver = NULL;
> write_unlock_irqrestore(&cpufreq_driver_lock, flags);
> - goto out;
> +out:
> + put_online_cpus();
> + return ret;
> }
> EXPORT_SYMBOL_GPL(cpufreq_register_driver);
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
Back to top | Article view | linux.kernel
csiph-web