From: Nishanth Menon <nm@ti.com>
To: "Gopinath, Thara" <thara@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"khilman@deeprootsystems.com" <khilman@deeprootsystems.com>,
"paul@pwsan.com" <paul@pwsan.com>,
"tony@atomide.com" <tony@atomide.com>,
"Cousson, Benoit" <b-cousson@ti.com>,
"Sawant, Anand" <sawant@ti.com>,
"Sripathy, Vishwanath" <vishwanath.bs@ti.com>,
"Premi, Sanjeev" <premi@ti.com>
Subject: Re: [PM-OPP][PATCH 2/4] OMAP: Correct the return value check after call into find_device_opp
Date: Tue, 13 Jul 2010 07:23:02 -0500 [thread overview]
Message-ID: <4C3C5AA6.8020303@ti.com> (raw)
In-Reply-To: <1279000026-24042-3-git-send-email-thara@ti.com>
Gopinath, Thara had written, on 07/13/2010 12:47 AM, the following:
> Earlier we were checking on !dev_opp where as find_device_opp returns
> a error pointer in case of error. So correcting the check as in the earlier
> code even if find_device_opp returns an error opp_init_cpufreq_table
> was not exiting.
>
> Signed-off-by: Thara Gopinath <thara@ti.com>
> ---
> arch/arm/plat-omap/opp.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/plat-omap/opp.c b/arch/arm/plat-omap/opp.c
> index a06b88d..d88a2e0 100644
> --- a/arch/arm/plat-omap/opp.c
> +++ b/arch/arm/plat-omap/opp.c
> @@ -457,8 +457,10 @@ void opp_init_cpufreq_table(struct device *dev,
> int i = 0;
>
> dev_opp = find_device_opp(dev);
> - if (WARN_ON(!dev_opp))
> + if (IS_ERR(dev_opp)) {
> + WARN_ON(1);
could we use pr_warning here instead of WARN_ON?
> return;
> + }
>
> freq_table = kzalloc(sizeof(struct cpufreq_frequency_table) *
> (dev_opp->enabled_opp_count + 1), GFP_ATOMIC);
--
Regards,
Nishanth Menon
next prev parent reply other threads:[~2010-07-13 12:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-13 5:47 [PM-OPP][PATCH 0/4] OMAP: Clean up series for generic opp layer Thara Gopinath
2010-07-13 5:47 ` [PM-OPP][PATCH 1/4] OMAP: Fix the compilation warning in the " Thara Gopinath
2010-07-13 5:47 ` [PM-OPP][PATCH 2/4] OMAP: Correct the return value check after call into find_device_opp Thara Gopinath
2010-07-13 5:47 ` [PM-OPP][PATCH 3/4] OMAP: Remove inclusion of PMIC specific header file in generic opp layer Thara Gopinath
2010-07-13 5:47 ` [PM-OPP][PATCH 4/4] OMAP: Remove dependency of generic opp layer on cpufreq Thara Gopinath
2010-07-13 12:23 ` Nishanth Menon [this message]
2010-07-13 14:32 ` [PM-OPP][PATCH 2/4] OMAP: Correct the return value check after call into find_device_opp Gopinath, Thara
2010-07-13 14:42 ` Nishanth Menon
2010-07-13 15:53 ` [PM-OPP][PATCH 0/4] OMAP: Clean up series for generic opp layer Nishanth Menon
2010-07-14 0:39 ` Gopinath, Thara
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=4C3C5AA6.8020303@ti.com \
--to=nm@ti.com \
--cc=b-cousson@ti.com \
--cc=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=premi@ti.com \
--cc=sawant@ti.com \
--cc=thara@ti.com \
--cc=tony@atomide.com \
--cc=vishwanath.bs@ti.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.