From: Viresh Kumar <viresh.kumar@linaro.org>
To: "Pankaj Gupta (Pankaj Gupta)" <Pankaj.Gupta@spreadtrum.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Saravana Kannan <skannan@codeaurora.org>,
Yinghai Lu <yinghai@kernel.org>
Subject: Re: [PATCH] driver: cpufreq: simplified goto out in cpufreq_register_driver
Date: Mon, 16 May 2016 16:40:19 +0530 [thread overview]
Message-ID: <20160516111019.GC2832@vireshk-i7> (raw)
In-Reply-To: <20160516110718.GA5005@pankajguptaubtnb.spreadtrum.com>
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
prev parent reply other threads:[~2016-05-16 11:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-16 11:07 [PATCH] driver: cpufreq: simplified goto out in cpufreq_register_driver Pankaj Gupta (Pankaj Gupta)
2016-05-16 11:10 ` Viresh Kumar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160516111019.GC2832@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=Pankaj.Gupta@spreadtrum.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=skannan@codeaurora.org \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox